[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

Eric V. Smith report at bugs.python.org
Thu Mar 10 09:15:33 EST 2022


Eric V. Smith <eric at trueblade.com> added the comment:

This is expected behavior. A set has no defined order. If you convert a set to a list, and you want some specific order, you'll need to sort it yourself.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46974>
_______________________________________


More information about the Python-bugs-list mailing list