[issue15524] Dict items() ordering varies across interpreter invocations

2012-08-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15524] Dict items() ordering varies across interpreter invocations

2012-08-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, because hash randomization is now enabled by default: http://docs.python.org/dev/reference/datamodel.html#object.__hash__ If you want deterministic behaviour, just set e.g. PYTHONHASHSEED=0. (or any other fixed value) -- nosy: +pitrou

[issue15524] Dict items() ordering varies across interpreter invocations

2012-08-01 Thread Dmitry Dvoinikov
New submission from Dmitry Dvoinikov: The following line prints different things each time you run it: python3 -c "print(', '.join({ '1': '2', '3': '4' }.keys()))" The output is either "1, 3" or "3, 1". Is such indeterministic behavior intentional ? Using Python 3.3.0b1 (default, Aug 1 2012,