[issue39806] different behavior between __ior__ and __or__ in dict made by PEP 584
Karthikeyan Singaravelan
report at bugs.python.org
Sun Mar 1 04:41:59 EST 2020
Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:
> Augmented assignment behaves identically to the update method called with a single positional argument, so it also accepts anything implementing the Mapping protocol (more specifically, anything with the keys and __getitem__ methods) or iterables of key-value pairs. This is analogous to list += and list.extend, which accept any iterable, not just lists. Continued from above:
Couldn't link to the specific part but the rationale is explained at https://www.python.org/dev/peps/pep-0584/#specification
----------
nosy: +xtreak -serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39806>
_______________________________________
More information about the Python-bugs-list
mailing list