[Python-Dev] PEP 382 progress: import hooks

Steve Holden steve at holdenweb.com
Fri Jul 23 13:25:39 CEST 2010


On 7/23/2010 11:57 AM, Brett Cannon wrote:
> 
> 
> On Thu, Jul 22, 2010 at 19:19, P.J. Eby <pje at telecommunity.com
> <mailto:pje at telecommunity.com>> wrote:
> 
>     At 01:51 PM 7/22/2010 +0100, Martin v. Löwis wrote:
> 
>         At EuroPython, I sat down with Brett and we propose an approach
>         how namespace packages get along with import hooks. I reshuffled
>         the order in which things get done a little bit, and added a
>         section that elaborates on the hooks.
> 
>         Basically, a finder will need to support a find_path method,
>         return all .pth files, and a loader will need to support a
>         load_module_with_path method, to initialize __path__.
> 
>         Please comment if you think that this needs further changes;
> 
> 
>     I'm not certain I understand it precisely.  There seem to be some
>     ambiguities in the spec, e.g.:
> 
>     "If fullname is not found, is not a package, or does not have any
>     *.pth files, None must be returned."
> 
>     What does "is not a package" actually mean in that context?
> 
> 
> The module is a module but not a package.
>  
so s/is not a package/is a module rather than a package/ perhaps?

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
DjangoCon US September 7-9, 2010    http://djangocon.us/
See Python Video!       http://python.mirocommunity.org/
Holden Web LLC                 http://www.holdenweb.com/



More information about the Python-Dev mailing list