[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 ___ Python tracker ___ __

[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7482fff297727bb5faf64cc92c73561ccf48feda by Miss Islington (bot) in branch '3.9': bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) (GH-27370) https://github.com/python/cpython/commit/7482fff297727bb5faf64cc92c73561ccf48fed

[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 563e05743c8f31366db7ef35a00e396c9f442b17 by Miss Islington (bot) in branch '3.10': bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) (GH-27369) https://github.com/python/cpython/commit/563e05743c8f31366db7ef35a00e396c9f442b

[issue43443] Should shelve support dict union?

2021-07-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +25908 pull_request: https://github.com/python/cpython/pull/27370 ___ Python tracker ___ __

[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c97c2a050cf753003012ae3f08e035326b8f6167 by Serhiy Storchaka in branch 'main': bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) https://github.com/python/cpython/commit/c97c2a050cf753003012ae3f08e035326b8f6167 --

[issue43443] Should shelve support dict union?

2021-07-26 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +25907 pull_request: https://github.com/python/cpython/pull/27369 ___ Python tracker _

[issue43443] Should shelve support dict union?

2021-07-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +25564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27004 ___ Python tracker ___

[issue43443] Should shelve support dict union?

2021-03-09 Thread Dominik Vilsmeier
Dominik Vilsmeier 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 t

[issue43443] Should shelve support dict union?

2021-03-09 Thread Brandt Bucher
Brandt Bucher added the comment: +1 for the MutableMapping comment. We purposely omitted shelve when determining what classes should grow the new operators. Guido's thoughts: > I definitely think we should leave Shelf alone, it's a toy class from a > different era. (https://bugs.python.org

[issue43443] Should shelve support dict union?

2021-03-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought. While __ior__() could be used as a short-cut for update(), the related __or__() method is more problematic because it would need to create a new underlying DB. So maybe this is a can worms that we should not open. It would be weird to

[issue43443] Should shelve support dict union?

2021-03-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Maybe say that they implement the MutableMapping interface? Yes, that's a good idea (also add link to the MutableMapping docs). > Right, that seems like a good idea. But `__ior__` could > be implemented nevertheless? Off-hand, I don't see why not. Addi

[issue43443] Should shelve support dict union?

2021-03-09 Thread Dominik Vilsmeier
Dominik Vilsmeier added the comment: Right, that seems like a good idea. But `__ior__` could be implemented nevertheless? -- ___ Python tracker ___ __

[issue43443] Should shelve support dict union?

2021-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The comment is outdated. Shelf objects also do not support methods copy and fromkey. Creating a new Shelve object without specifying a new underlying database object does not make much sense. Maybe say that they implement the MutableMapping interface? >>>

[issue43443] Should shelve support dict union?

2021-03-09 Thread Dominik Vilsmeier
New submission from Dominik Vilsmeier : The docs of shelve mention that > Shelf objects support all methods supported by dictionaries. This eases the > transition from dictionary based scripts to those requiring persistent > storage. However the `|=` operator is not implemented, preventing a