MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/fjk6u1/sort_algorithm/fkpaaav
r/ProgrammerHumor • u/Hamstorian • Mar 16 '20
614 comments sorted by
View all comments
Show parent comments
41
Technically yes, but the way that hashing integers works, in standard python, integers are added to sets in order, at least most of the time. Implementations of python like pypy do not have this behavior.
3 u/[deleted] Jul 15 '20 PSA: Please do not rely on this in your code 2 u/Raydan4 Jul 16 '20 Well obviously, that’s not what sets are for
3
PSA: Please do not rely on this in your code
2 u/Raydan4 Jul 16 '20 Well obviously, that’s not what sets are for
2
Well obviously, that’s not what sets are for
41
u/Raydan4 Mar 17 '20
Technically yes, but the way that hashing integers works, in standard python, integers are added to sets in order, at least most of the time. Implementations of python like pypy do not have this behavior.