"as" keyword woes

Warren DeLano warren at delsci.com
Wed Dec 3 17:49:19 EST 2008


> Because it can be used at the import statement to let the imported
thing
> be known under another name?
> Something like:
> 
>  >>> import xml.etree.ElementTree as ET

Yes, but that syntax worked fine for years without "as" actually having
to be a keyword.  There must be something more going on here...

I have to believe that was some reason or benefit gained from making it
a keyword, and thus prohibiting its use anywhere else, as opposed to
sticking with the status quo.  Otherwise this would merely be a
pointless change (perhaps even destructive!).





More information about the Python-list mailing list