[Import-SIG] PEP 420: Implicit Namespace Packages

Eric V. Smith eric at trueblade.com
Sat Apr 28 12:27:19 CEST 2012


On 4/27/2012 8:52 PM, Carl Meyer wrote:
> On 04/19/2012 02:18 PM, Eric V. Smith wrote:
>> This reflects (I hope!) the discussions at PyCon. My plan is to produce
>> an implementation based on the importlib code, and then flush out pieces
>> of the PEP.
>>
>> In particular, I want to make sure the PEP addresses the various
>> objections that were raised, especially by Nick.
> 
> One clarity issue in the PEP:
> 
> "If the scan along the parent path completes without finding a module or
> package, then a namespace package is created."
> 
> This seems incomplete, and should say something like:
> 
> "If the scan along the parent path completes with finding a module or
> package, *but at least one directory was recorded,* then a namespace
> package is created."
> 
> The current wording seems to imply that any failed import would always
> cause the creation of a namespace package with an empty __path__, which
> I presume is not the intent.

Completely agree.  I changed "but" to "and", but otherwise used it
as-is. It's checked in.

Thanks!

Eric.



More information about the Import-SIG mailing list