[Python-Dev] 'import as' (original) (raw)

Ka-Ping Yee ping@lfw.org
Fri, 18 Aug 2000 23:43:18 -0700 (PDT)


My $0.02.

+1 on: import as import as

+1 on: from import as from import as

+1 on: from . import as from . import as

-1 on either meaning of:

      import <pkgname>.<modname> as <localname>

...as it's not clear what the correct meaning is.

If the intent of this last form is to import a sub-module of a package into the local namespace with an aliased name, then you can just say

      from <pkgname> import <modname> as <localname>

and the meaning is then quite clear.

-- ?!ng