On Sat, 24 Oct 2009 07:53:24 am Willi Richert wrote: > Hi, > > surprised about the performance of for/break provided by Vitor, I did > some more testing. It revealed that indeed we can forget the get() > (which was implemented as a stripped down pop()):
I don't understand that conclusion. According to your tests, your implementation of get() is as fast as "for x in set: break", and it's certainly much, much more readable and straightforward. -- Steven D'Aprano _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com