[Python-3000] Set literal

Raymond Hettinger python at rcn.com
Fri Jan 25 04:56:36 CET 2008


[Jim Jewett]
> I thought you tried changing those tuples to frozensets
>(because it was semantically better), and found that it 
> didn't actually win for tuples of length 2 or 3.

The sets were faster.  The automatic transformation didn't
go in because it changed semantics -- the searched for item
would need to be hashable -- the tuple search only requires
an equality test.


Raymond


More information about the Python-3000 mailing list