"as" keyword woes

Aaron Brady castironpi at gmail.com
Thu Dec 4 06:04:54 EST 2008


On Dec 4, 4:43 am, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Thu, 4 Dec 2008 01:28:56 -0800, "Warren DeLano" <war... at delsci.com>
> declaimed the following in comp.lang.python:
>
> > In addition, note that my choice of a concise method identifier affects
> > only my users.  Python's introduction of a new keyword affects the
> > entire Python world code base, so perhaps you should be directing your
> > "choose better names" criticism in another direction?
>
>         Dropping in...
>
>         If a "chosen name" mirrors a syntactic element -- whether reserved
> or not -- I'd consider that name potentially ambiguous or conflicted.
>
>         While "if" has been long a reserved word, I can as easily see
> someone using "if" as a shorthand name for "interface". And if "if" were
> not a reserved word, one might encounter code on the lines of
>
>         if = if + 1
>
> which is quite obnoxious to my eyes... or maybe
>
>         if if.connected:
>                 if.close()

Does the OP hold the following should be legal?

if if or or:
  and( for )
if not:
  while( def )

If not, it's an exception to Python's trend of not handcuffing
programmers.



More information about the Python-list mailing list