Dominik Vilsmeier <dominik.vilsmeier1...@gmail.com> added the comment:

It's true, having `__ior__` but not `__or__` would probably be weird. In the 
end it's just "nice to have", but I'm not even sure that this applies. Calling 
`db.update(...)` is still more explicit than `db |= ...`.  The docs mention that

> This eases the transition from dictionary based scripts to those requiring 
> persistent storage.

For my use cases, however, I always knew right from the beginning that I want 
object persistence between different runs of a script (e.g. for data analysis, 
caching the expensive results), so it was always clear that I'm working with a 
Shelf object and not a dict (i.e. no expectations on the availability of `|=`).

Primarily, this issue was meant to point out the mismatch of 
docs/implementation and not to get `|=` implemented for `Shelf`. In the end, I 
think updating the docs is all that is needed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43443>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to