builtin set literal

Raymond Hettinger python at rcn.com
Thu Feb 15 21:17:45 EST 2007


>> What about "{,}"? For consistency "(,)" and "[,]" might
>> also have to be permissible, and maybe even "{:}" for an
>> empty dict.

The notion of a set literal was rejected in PEP 218,
http://www.python.org/dev/peps/pep-0218/ . One of the reasons for the
rejection was that the small benefit of a literal notion was more than
offset by the attendant need for syntactical atrocities like those
listed above.


Raymond




More information about the Python-list mailing list