[Python-Dev] Empty directory is a namespace?

"Martin v. Löwis" martin at v.loewis.de
Sun Jun 24 09:51:28 CEST 2012


On 23.06.2012 17:58, Antoine Pitrou wrote:
> On Sat, 23 Jun 2012 17:55:24 +0200
> martin at v.loewis.de wrote:
>>> That's true. I would have hoped for it to be recognized only when
>>> there's at least one module or package inside, but it doesn't sound
>>> easy to check for (especially in the recursive namespace packages case
>>> - is that possible?).
>>
>> Yes - a directory becomes a namespace package by not having an __init__.py,
>> so the "namespace package" case will likely become the default, and people
>> will start removing the empty __init__.pys when they don't need to support
>> 3.2- anymore.
> 
> Have you tested the performance of namespace packages compared to
> normal packages?

No, I haven't.

Regards,
Martin


More information about the Python-Dev mailing list