'as' keyword - when/how to use it

Terry Reedy tjreedy at udel.edu
Sat Jul 24 04:57:09 EDT 2010


On 7/24/2010 2:33 AM, Dummey wrote:
> I am having the hardest time trying to find documentation on proper
> use of the 'as' keyword (aside from . I initially thought that I would
> be allowed to do something such as:
>
> import shared.util as util
>
> The as statement seems to be causing a lot of ''module' object has no
> attribute'. Is it safe to assume that this is not the way to use it?

Give an example of real code raising an exception when importing from 
the stdlib and the corresponding error traceback in its entirety.

-- 
Terry Jan Reedy




More information about the Python-list mailing list