Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
I'm sorry, I don't understand what part of the documentation you think is violated here. The docs say that sets are unordered, but of course when printing the elements have to be given in *some* order. The given output seems unordered to me: -1 is smaller than 25, but it appears last in the output. The specific order you see will depend on the specific values in the set, as well as the order that they were inserted, deleted, and/or re-inserted in some arbitrary way. For example: >>> repr({4, 5, 2**31+1, 2, 2**31+2, 3, 2**31, 0}) '{0, 2147483648, 2, 3, 2147483650, 2147483649, 5, 4}' I don't think there is a bug here. Can you explain what you think the bug is, in detail please? ---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38853> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com