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 josh.r
Recipients josh.r, rhettinger, stutzbach, xiang.zhang
Date 2016-05-03.20:30:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462307422.39.0.966758020958.issue26915@psf.upfronthosting.co.za>
In-reply-to
Content
At some point someone really needs to decide if the C layer behavior of performing an identity test before full equality checking is something that should be emulated at the Python layer or not. The current state seems ridiculous, where C containers check identity first simply by using the easier RichCompareBool function, while Python containers have to have the identity-then-equality check rewritten explicitly, which feels like a DRY violation.

Makes it harder for non-CPython implementations too, since they end up either not matching CPython behavior, or writing extra code to match the CPython quirks.

I have nothing against this patch, but between PyObject_RichCompareBool and the various slightly strange behaviors in the argument parsing format codes (which leads to silly workarounds like _check_int_field in #20858), I feel like the Python code base is getting cluttered with hacks to emulate the hacky C layer.
History
Date User Action Args
2016-05-03 20:30:22josh.rsetrecipients: + josh.r, rhettinger, stutzbach, xiang.zhang
2016-05-03 20:30:22josh.rsetmessageid: <1462307422.39.0.966758020958.issue26915@psf.upfronthosting.co.za>
2016-05-03 20:30:22josh.rlinkissue26915 messages
2016-05-03 20:30:21josh.rcreate