[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Thanks, for the replies, didn't know about that. Interesting thing that `collections.abc.Set` base class has implementations of `__and__`, `__or__`, `__sub__` and `__xor__` methods, it also provide `_from_iterable` class method that is

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Brandt Bucher
Brandt Bucher added the comment: (Also, it would break virtual subclasses.) -- nosy: +brandtbucher ___ Python tracker ___ ___

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: This was discussed during the PEP review and rejected. The main reason is that this operator would need to create a new instance, and there is no standard API that's part of the Mapping protocol that can be used (the constructor of a Mapping instance

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch pull_requests: +22970 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24141 ___ Python tracker

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___ ___

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
New submission from Yurii Karabas <1998uri...@gmail.com>: In python3.9 `dict` `bitwise or` operator was introduced. I think it will be great if `collections.abc.Mapping` and `collections.abc.MutableMapping` will have a default implementation of `bitwise or` operator. -- messages: