-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include example of OrderedDict's intransitive __eq__ implementation? #77
Comments
Interesting! I'll add it in the next update, or if you like, you can submit a PR for this. Thanks for sharing it 😄 |
Do you have a link for where Raymond said this? I agree the behaviour is not obvious, but it is intended and documented:
https://docs.python.org/3/library/collections.html#ordereddict-objects |
Well, not exactly anywhere, as my |
Interesting thanks, I guess that either way the behaviour would surprise some users. I'm not convinced this is a doc bug, but file it as one if you think so https://bugs.python.org/ |
Thanks for suggesting this @jab , this was actually one of very few genuine WTFs I've observed. Added in the above commit ^^, feel free to have a look and point out any corrections / missing details. |
The second snippet in cosmologicon/pywat#38 provides an example of such a big WTF in Python that Raymond Hettinger himself even called OrderedDict's intransitive equality a mistake. Any interest in including that here?
The text was updated successfully, but these errors were encountered: