[Import-SIG] PEP 402: specification questions

"Martin v. Löwis" martin at v.loewis.de
Wed Nov 9 10:35:42 CET 2011


I'm trying to understand PEP 402, and have difficulties figuring
out what exactly it says. I presume that the section "Specification"
is intended to give the complete syntax and semantics of the
proposed change to Python.

A. In "Virtual Paths", it talks about obtaining importer objects
   for each path item, and then calling get_subpath on it. In the
   current implementation, not all sys.path entries correspond to
   an importer object: so what's the impact (if any) on old-style
   sys.path entries (i.e. regular directories)?

   Or, if some "builtin" importer is implied: what is its semantics
   of get_subpath for the builtin importer?

B. "Specification" starts with "importing names containing at least
   one .". That seems clear enough, however, I wonder whether

   from zope import interface

   is supported by the PEP (i.e. where zope.interface is a nested
   package, yet the names in the import don't contain a dot at all).

   I presume that the case is meant to be supported, but then I
   wonder how precisely the mechanism described in the PEP is
   triggered.

Regards,
Martin


More information about the Import-SIG mailing list