[Python-Dev] Re: Christmas Wishlist

Guido van Rossum guido at python.org
Mon Dec 15 12:10:24 EST 2003

> Okay, so what are global and local imports?  I thought I understood
> after Barry's first post, but not now.  I see the <wink>, but
> figured there's still some germ of desire in Barry's "ban local
> imports" comment.  What kind of imports do we have today?  Do they
> relate to the position of the import statement in the code or to the
> location of the module being imported along sys.path?

Traditionally, we've called these absolute (== global) and relative
(== local) imports.  The terms relate to the module's full package
name, usually equivalent to its location on the filesystem.  sys.path
and the placement of the import statement do not enter into it, except
that sys.path is the very definition of absolute import.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list