[Python-ideas] Make all keywords legal as an identifier

Ethan Furman ethan at stoneleaf.us
Mon Apr 25 23:26:05 CEST 2011


haael wrote:
> @ Brain Curtin
> 
>> Names tend to be nouns, so first I can't imagine why you'd want "with" as a
>> name, but you could exchange almost all keywords in the example and it's not
>> a great case. Making this change rather than working around poor name choice
>> gets a -1 from me.
> 
> First of all, many nouns are reserved, i.e. "object" or "class".

Many?  Aren't we still at less than 50 words total?  Pretty 
infinitesimal when compared with the 100,000+ words in the English language.

> Second: variable names are usually nouns indeed, but functions and 
> methods are often verbs, while named parameters can be prepositions and 
> adverbs.
> 
> For example:
>> turtles.fight(with=honour)
> 
> Python kidnapped many verbs and prepositions and made them reserved.

See above.  This is a ridiculous exaggeration.

~Ethan~



More information about the Python-ideas mailing list