import x as y

Andrew Kuchling akuchlin at mems-exchange.org
Sun Oct 29 21:38:06 EST 2000


Tyler Eaves <tyler at tylereaves.com> writes:
> Just wondering, as a python 'advanced' novice, is there any advantage
> of:
> import x as y
>    rather than
> import x
> y=x

y and x are then aliases for the same object.  You'd have to write
'y=x ; del x' to really achieve the same effect as 'import x as y'.

--amk



More information about the Python-list mailing list