This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dominik V.
Recipients Dominik V., brandtbucher, rhettinger, serhiy.storchaka
Date 2021-03-09.23:35:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615332933.16.0.0663750094067.issue43443@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-09 23:35:33Dominik V.setrecipients: + Dominik V., rhettinger, serhiy.storchaka, brandtbucher
2021-03-09 23:35:33Dominik V.setmessageid: <1615332933.16.0.0663750094067.issue43443@roundup.psfhosted.org>
2021-03-09 23:35:33Dominik V.linkissue43443 messages
2021-03-09 23:35:32Dominik V.create