This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients brandtbucher, domdfcoding, gvanrossum, ncoghlan, rhettinger, serhiy.storchaka
Date 2021-08-01.14:33:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Ouch, you're right - I forgot that dict just returned NotImplemented from comparisons and unions and made it the other operand's problem:

>>> d1 = dict(x=1)
>>> d2 = dict(x=1)
>>> from types import MappingProxyType as proxy
>>> d1.__eq__(proxy(d2))
>>> d1.__or__(proxy(d2))

Perhaps we could mitigate the performance hit by skipping the copy when the other side is either a builtin dict (subclasses don't count), or a proxy around a builtin dict?
Date User Action Args
2021-08-01 14:33:00ncoghlansetrecipients: + ncoghlan, gvanrossum, rhettinger, serhiy.storchaka, brandtbucher, domdfcoding
2021-08-01 14:33:00ncoghlansetmessageid: <>
2021-08-01 14:33:00ncoghlanlinkissue43838 messages
2021-08-01 14:33:00ncoghlancreate