In python 3.9, dictionaries gained combine | and update |= operators. Is there a dunder/magic method which will enable this to be used for other cl
|
|=
Yes, | and |= correspond to __or__ and __ior__.
Don't look at the python source code, look at the documentation. In particular, the data model.
See here
And note, this isn't specific to python 3.9.