This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ylem
Recipients Ylem, josh.r, steven.daprano
Date 2019-11-20.15:36:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574264193.29.0.0751131960419.issue38853@roundup.psfhosted.org>
In-reply-to
Content
Thank you for pointing out my lack of clarity: I apologize.
I probably should not have split this issue in two (issue38855).

My confusion stems from the fact that I expected the unpacking of a set to return the same output as that obtained from the unpacking of a list.
From my testing, I gather that the unpacking of a set is performed via its repr, which uses "some ordering".

In closing, I want to note two points:

1. repr is apparently platform-dependent (here: Python 3.6.7 [MSC v.1900 64 bit (AMD64)]):

The code given by steven.daprano run in a jupyter lab cell or in VS Code yields a different output:
>>> repr({4, 5, 2**31+1, 2, 2**31+2, 3, 2**31, 0})
'{2147483648, 2147483649, 2, 2147483650, 4, 5, 3, 0}'

2. Testing reviewer's assertion: "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."
This counter example, where element 0 is moved to the second position, shows that there is not such order dependence: 
>>> repr({4, 0, 5, 2**31+1, 2, 2**31+2, 3, 2**31})
'{0, 2147483649, 2, 2147483650, 4, 5, 3, 2147483648}'
History
Date User Action Args
2019-11-20 15:36:33Ylemsetrecipients: + Ylem, steven.daprano, josh.r
2019-11-20 15:36:33Ylemsetmessageid: <1574264193.29.0.0751131960419.issue38853@roundup.psfhosted.org>
2019-11-20 15:36:33Ylemlinkissue38853 messages
2019-11-20 15:36:32Ylemcreate