Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66448

Absolute imports?

From Roy Smith <roy@panix.com>
Newsgroups comp.lang.python
Subject Absolute imports?
Date 2014-02-15 10:06 -0500
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <roy-34FC23.10062115022014@news.panix.com> (permalink)

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Absolute imports? Roy Smith <roy@panix.com> - 2014-02-15 10:06 -0500
  Re: Absolute imports? Chris Angelico <rosuav@gmail.com> - 2014-02-16 02:26 +1100
  Re: Absolute imports? Peter Otten <__peter__@web.de> - 2014-02-15 16:46 +0100

csiph-web