[Python-Dev] Relative import
barry at python.org
Wed Dec 17 22:08:21 EST 2003
On Wed, 2003-12-17 at 22:04, Andrew Bennetts wrote:
> On Wed, Dec 17, 2003 at 09:33:43PM -0500, Barry Warsaw wrote:
> > That's why when I tend to think about this, I start wanting a way to
> > spell "definitely give me the global one, no matter what". IOW, I feel
> > like I want a way to bypass relative module lookups.
> Alternatively, maybe what you want is a way to say "definitely give me the
> standard library one, no matter what", e.g.
> from stdlib import codecs
Interesting. I see the subtle distinction. One searches only the
standard library, the other searches every directory on sys.path. I'm
not sure I'd have much need to restrict the search to just the standard
library. Plus, would that include site-packages?
More information about the Python-Dev