[Python-3000] Set literal

Gustavo Niemeyer gustavo at niemeyer.net
Fri Jan 25 14:41:31 CET 2008

> I hope it isn't too confusing that {1: 1} creates a *mutable* dict
> while {1} creates an *immutable* frozenset. I still find this slightly
> inelegant. But the practicality of being able to treat set literals as
> compile-time constants wins me over.

Another point in favor of Raymond's suggestion is that problems created
by getting it wrong in the first try are more easily solved when going
frozenset => set than the opposite way.

Gustavo Niemeyer

More information about the Python-3000 mailing list