Absolute imports?

Roy Smith roy at panix.com
Sat Feb 15 16:06:21 CET 2014


http://docs.python.org/2/whatsnew/2.5.html says:

"Once absolute imports are the default, import string will always find 
the standard library¹s version."

Experimentally, it appears that modules in site-packages are also found 
by absolute imports.  I wouldn't consider site-packages to be part of 
the "standard library".  Can somebody give me a more precise description 
of what absolute import does?

It also says, "This absolute-import behaviour will become the default in 
a future version (probably Python 2.7)", but it appears that 2.7.6 is 
still doing relative by default.



More information about the Python-list mailing list