[Python-ideas] Empty set, Empty dict

Chris Angelico rosuav at gmail.com
Sun Jun 22 14:51:03 CEST 2014


On Sun, Jun 22, 2014 at 10:48 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Clint Hepner, 22.06.2014 14:29:
>> There's one more, even more obvious (IMO) option for an empty set literal: U+2205, EMPTY SET. But that opens a whole other can of worms, namely expanding the grammar to allow Unicode characters outside of identifiers.
>
> ... and then teaching people how to type them on their keyboards.

At least the concept of "empty set literal" has more merit than "save
a few keystrokes on the word 'lambda'". Even if it isn't something
easily typed, it would have value over the current spelling of
"set()", which isn't a literal. (Whether it has *enough* value over
set() to be worth doing is still in question, but it's not like lambda
vs λ.)

ChrisA


More information about the Python-ideas mailing list