Mark Dickinson <dicki...@gmail.com> added the comment: > As far as I know, it is a binary search tree,
It's not: it's based on a hash table. It's essentially a dict with keys but no values. An additional complication is that the hash table can be very sparsely filled, in the case of a large set that has had most of its elements deleted---there's no automatic shrinkage of the hash table in that case. So repeated random selection until you find a filled hash table entry would be inefficient in that case. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7522> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com