Message388395
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. |
|
Date |
User |
Action |
Args |
2021-03-09 23:35:33 | Dominik V. | set | recipients:
+ Dominik V., rhettinger, serhiy.storchaka, brandtbucher |
2021-03-09 23:35:33 | Dominik V. | set | messageid: <1615332933.16.0.0663750094067.issue43443@roundup.psfhosted.org> |
2021-03-09 23:35:33 | Dominik V. | link | issue43443 messages |
2021-03-09 23:35:32 | Dominik V. | create | |
|