[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-06 Thread Hamish Campbell
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

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
Hamish Campbell added the comment: Note also the differences here: >>> print(set([True, 1])) {True} >>> print({True, 1}) {1} >>> print({x for x in [True, 1]}) {True} -- ___ Python tracker <htt

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
Hamish Campbell added the comment: Apologies, that first line should read "It looks like the documentation of set displays do not match behaviour in some cases". -- ___ Python tracker <http://bugs.python.o

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
New submission from Hamish Campbell: It looks like the behaviour of set displays do not match behaviour in some cases. The documentation states: "A set display yields a new mutable set object, the contents being specified by either a sequence of expressions or a comprehension. When a