frozenset question

Michael Hudson mwh at python.net
Wed Jul 6 15:24:37 CEST 2005


Will McGugan <news at NOwillmcguganSPAM.com> writes:

> Qiangning Hong wrote:
> > On 7/6/05, Will McGugan <news at nowillmcguganspam.com> wrote:
> > 
> >>Hi,
> >>
> >>Are there any benefits in using a frozenset over a set, other than it
> >>being immutable?
> > A frozenset can be used as a key of a dict:
> 
> Thanks, but I meant to imply that.
> 
> I was wondering if frozenset was faster or more efficient in some
> way.

No, the 'usable as a dict key' is the main motivation for frozenset's
existence.

Cheers,
mwh

-- 
  The bottom tier is what a certain class of wanker would call
  "business objects" ...                      -- Greg Ward, 9 Dec 1999



More information about the Python-list mailing list