[docs] [issue26020] set_display evaluation order doesn't match documented behaviour
Hamish Campbell
report at bugs.python.org
Wed Jan 6 03:46:13 EST 2016
Hamish Campbell added the comment:
> Do you have a use case where `x == y`/`hash(x) == hash(y)` does not mean that `x` and `y` should be interchangeable? True and 1 are 100% interchangeable, minus their str() output, and my example is very unlikely to ever appear in actual code.
No I don't have a use case :)
> The culprit is the BUILD_SET opcode in Python/ceval.c which unnecessarily loops backwards (it looks like it was copied from the BUILD_TUPLE opcode).
Incidentally, pypy seems to behave the same as reported here.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26020>
_______________________________________
More information about the docs
mailing list