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/2012-May/119645.html below:

[Python-Dev] PEP 420 - dynamic path computation is missing rationale

[Python-Dev] PEP 420 - dynamic path computation is missing rationaleNick Coghlan ncoghlan at gmail.com
Thu May 24 05:49:08 CEST 2012
On Thu, May 24, 2012 at 11:02 AM, Eric V. Smith <eric at trueblade.com> wrote:
> On 5/23/2012 8:58 PM, PJ Eby wrote:
>> OTOH, that's finders, and I think we're dealing with loaders here.
>> Splitting hairs, perhaps, but at least it's in a good cause.  ;-)
>
> I guess I could store the passed-in parent path, and use that if it
> can't be found through sys.modules.
>
> I'm not sure I can conjure up code to test this.

I don't think there's a need to change anything from your current
strategy, but we should be clear in the docs:

1. Finders should *not* assume their parent packages have been loaded
(and should not load them implicitly)
2. Loaders *can* assume their parent packages have already been loaded
and are present in sys.modules (and can complain if they're not there)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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