Message264764
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. |
|
Date |
User |
Action |
Args |
2016-05-03 20:30:22 | josh.r | set | recipients:
+ josh.r, rhettinger, stutzbach, xiang.zhang |
2016-05-03 20:30:22 | josh.r | set | messageid: <1462307422.39.0.966758020958.issue26915@psf.upfronthosting.co.za> |
2016-05-03 20:30:22 | josh.r | link | issue26915 messages |
2016-05-03 20:30:21 | josh.r | create | |
|