[Python-3000] Set literal

Raymond Hettinger python at rcn.com
Sun Jan 27 05:39:36 CET 2008

> Given that "x in {1,2,3}" can be optimized just as well with mutable
> sets (can somebody think of an example that can't?), do you still
> support immutable using the literal notation?

>From an optimization point of view, it is still best to have {...} as a frozenset.

However, my support for it has waned anyway.  The notation is also
used for set comprehension and those should be mutable.


More information about the Python-3000 mailing list