[issue41656] Sets are storing elements in sorted order.

2020-08-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: Here's another example: py> set([1, 2**63, 4, -5, 6, 5]) {1, 9223372036854775808, 4, 6, 5, -5} By the way, in the future, please don't post screen shots of text, copy the code and output and paste it as text into your bug report. Screenshots make it hard

[issue41656] Sets are storing elements in sorted order.

2020-08-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: "Unordered" means that the language doesn't promise any specific order, it doesn't mean that there is no order at all. Try strings: py> set("abcdef") {'b', 'f', 'c', 'e', 'd', 'a'} or different ints: py> set([1, 0, -2]) {0, 1, -2} -- nosy: +stev

[issue41656] Sets are storing elements in sorted order.

2020-08-28 Thread Piyush Pravin
New submission from Piyush Pravin : In documentation it is written that " Sets are unordered collection", but actually it is storing the elements in sorted order. -- assignee: docs@python components: Documentation files: dndndgndghbdgngdndgngtn.PNG messages: 376037 nosy: docs@python, p