[PATCH] Re: frozenset() without arguments should return a singleton

Raymond Hettinger vze4rx4y at verizon.net
Sun Feb 13 21:00:26 EST 2005


"Stefan Behnel"
> I generally believe that many programmers will
> silently expect frozenset() to be (and become) more efficient than set() - in
> whatever regard: processing, memory, etc.

That belief is without foundation.  Except for mutating
methods and hashing methods, both set() and frozenset() share the same
underlying code and data structure.  In this respect, they differ from list()
and tuple() which have no shared code and has two substantially different
data structures.


Raymond Hettinger






More information about the Python-list mailing list