On Wed, Apr 8, 2009 at 2:44 AM, Mark Dickinson <dicki...@gmail.com> wrote: > On Wed, Apr 8, 2009 at 7:13 AM, John Barham <jbar...@gmail.com> wrote: >> If you play around a bit it becomes clear that what set.pop() returns >> is independent of the insertion order: > > It might look like that, but I don't think this is > true in general (at least, with the current implementation): > >>>> foo = set([1, 65537]) >>>> foo.pop() > 1 >>>> foo = set([65537, 1]) >>>> foo.pop() > 65537
You wrote a program to find the two smallest ints that would have a hash collision in the CPython set implementation? I'm impressed. And by impressed I mean frightened. -Jack _______________________________________________ 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