[Python-Dev] slightly inconsistent set/list pop behaviour

Tennessee Leeuwenburg tleeuwenburg at gmail.com
Wed Apr 8 07:40:42 CEST 2009

Now, I know that sets aren't ordered, but...

foo = set([1,2,3,4,5])
bar = [1,2,3,4,5]

foo.pop() will reliably return 1
while bar.pop() will return 5

discuss :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090408/9bfcc1d0/attachment.htm>

More information about the Python-Dev mailing list