frozenset question
Will McGugan
news at NOwillmcguganSPAM.com
Wed Jul 6 06:30:14 EDT 2005
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.
Thinking back to the dark ages of C++, you could optimize things that
you knew to be constant.
Will
--
http://www.willmcgugan.com
"".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in
"jvyy*jvyyzpthtna^pbz")
More information about the Python-list
mailing list