A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-September/068914.html below:

[Python-Dev] New relative import issue

[Python-Dev] New relative import issue [Python-Dev] New relative import issueGreg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 22 02:40:03 CEST 2006
Guido van Rossum wrote:

> While I agree with your idea(l), I don't think that's what Greg meant.
> He clearly say "sys.path should not exist at all".

Refining that a bit, I don't think there should be
a *single* sys.path for the whole program -- more
like each module having its own sys.path. And, at
least in most cases, its contents should be set
up from static information that exists outside the
program, established when the module is installed.

One reason for this is the lack of any absolute
notion of a "program". What is a program on one
level can be part of a larger program on another
level. For example, a module with test code that
is run when it's invoked as a main script.
Sometimes it's a program of its own, other times
it's not. And it shouldn't *matter* whether it's
a program or not when it comes to being able to
find other modules that it needs to import. So
using a piece of program-wide shared state for
this seems wrong.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4