Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
The operators | and |= always call __or__() and __ior__(). Support for these methods is optional. Some mapping classes support both methods, some only support __or__, and some support neither one. Adding support is done is done on a case by case basis. SignalDict could be updated if needed. To make it easier for user defined classes, two new collections.ABCs could be added, MappingWithOr and MutableMappingWithIor. That is similar to what we had done in Python 2.7 with UserDict and IterableUserDict. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43085> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com