import x as y

Delaney, Timothy tdelaney at avaya.com
Sun Oct 29 21:05:47 EST 2000


> Just wondering, as a python 'advanced' novice, is there any advantage
> of:
> 
> import x as y
> 
> ratheer than
> 
> import x
> y=x
> ?

Actually, shouldn't that be ...

import x
y = x
del x

This would be one advantage ... "x" doesn't make it into the current
module's namespace.

Tim Delaney
Avaya Australia




More information about the Python-list mailing list