"as" keyword woes

Carl Banks pavlovevidence at gmail.com
Thu Dec 4 22:08:46 CET 2008


On Dec 4, 2:42 pm, Albert Hopkins <mar... at letterboxes.org> wrote:
> It's been a while so I can't remember, but it seems like "yield" was
> dropped in to python relatively quickly in 2.2.  Was there a similar
> outrage when "yield" became a keyword?

This is just one guy complaining.  Yes, I'd imagine when "yield" and
"with" were made into keywords there was probably someone, somewhere
who complained about that, too.

I doubt there will much outrage over "as".  It has been in the works
for eight years and six releases, after all.  Anyone who was paying
attention wouldn't have been using "as" as an identifier.  Among those
who weren't paying attention, anyone smart wouldn't have been using
"as" as an identifier because A) it is used as a syntactic element,
and even if it's not a keyword it's poor style to use it also as an
identifier, and B) you had to suspect sooner or later they would make
it into a real keyword.

Among those who were using "as" as an identifier, the vast majority
will simply do an interactive search-and-replace to fix it.

People like Warren here who have distributed codebases they can't
easily fix up, and who were neither smart nor informed enough to avoid
using "as", are a pretty tiny minority, I would guess.


Carl Banks



More information about the Python-list mailing list