When convert two sets with the same elements to lists, are the lists always going to be the same?

Andrew Berg bahamutzero8825 at gmail.com
Thu May 3 22:06:48 EDT 2012


On 5/3/2012 7:36 PM, Peng Yu wrote:
> When convert two sets with the same elements to two lists, are the
> lists always going to be the same (i.e., the elements in each list are
> ordered the same)? Is it documented anywhere?
Sets are by definition unordered, so depending on their order would not
be a good idea. If the order stays the same, it's at most an
implementation detail which may or may not be consistent across
versions, and will likely not be consistent across implementations.

-- 
CPython 3.3.0a3 | Windows NT 6.1.7601.17790



More information about the Python-list mailing list