PEP 328: Imports: Multi-Line and Absolute/Relative

Aahz aahz at pythoncraft.com
Fri Apr 2 20:11:47 EST 2004


In article <x77jxfupuc.fsf at handshake.de>,
Dieter Maurer  <dieter at handshake.de> wrote:
>
>Python explicitely adds the directory it finds a script in to the front
>of "sys.path". I think it does this because it expects a high
>chance that the script *needs* to access modules in this directory.

Actually, that's not quite true.  If the script is in the current
directory, Python prepends "''" to sys.path, which means that you'll
have problems if you use os.chdir().

>What about inventing a syntax for absolute imports as well (and let the
>behaviour of unadorned imports as it is now).

Because absolute imports are the common case.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"usenet imitates usenet"  --Darkhawk



More information about the Python-list mailing list