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

Westley Martínez anikom15 at gmail.com
Fri Apr 29 00:38:43 CEST 2011


On Mon, Apr 25, 2011 at 10:21:07PM +0200, Masklinn wrote:
> On 2011-04-25, at 22:13 , Brian Curtin wrote:
> > On Mon, Apr 25, 2011 at 15:05, Mike Graham <mikegraham at gmail.com> wrote:
> >> On Mon, Apr 25, 2011 at 3:51 PM, Brian Curtin <brian.curtin at gmail.com>
> >> wrote:
> >> [snipped]
> 
> With is actually a very nice name for some things, it creates very readable, english-looking code.
> 
> And what about `class`? Or `for` (that one clashes hard against the HTML object model, label elements have a for attribute). `in`, `except` or `is` may also be interesting in some cases.
> 
> Do all Python keywords have this issue? No, I doubt anybody's ever tried to called an attribute `elif`, but I definitely ran into the issue a few times.

for loops existed long before HTML, so I don't really see your point.
Again, I've never needed to use any of the reserved keywords for
variables.



More information about the Python-ideas mailing list