[Python-Dev] Dropping init.py requirement for subpackages (original) (raw)
Gustavo Carneiro gjcarneiro at gmail.com
Thu Apr 27 18:20:31 CEST 2006
- Previous message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Next message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/27/06, Thomas Wouters <thomas at python.org> wrote:
On 4/27/06, Gustavo Carneiro <gjcarneiro at gmail.com> wrote: > Besides, Guido's original proposal is not a fix for your problem, > > either; he only proposes to change the requirement for subpackages. > > > > It is a solution for my problem. I don't need the init.py file > for anything, since I don't need anything defined in the the 'foo' > namespace, only the subpackages foo.bar and foo.zbr . > ... No. Guido's original proposal is not a fix for your problem, because it doesn't affect the 'foo' namespace. Guido's original proposal still requires foo/init.py for your namespace to work, it just makes foo/bar/init.py and foo/zbr/init.py optional.
Damn, you're right, I confused subpackage with submodule :P
In that case, can I counter-propose to stop requiring the init.py file in [foo/init.py, foo/bar.py] ? ;-)
The proposal would mean that a directory 'foo' with a single file bar.pywould make the module ' foo.bar' available if the parent directory of 'foo' is in sys.path.
/me faces the pitchforks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060427/463e0135/attachment.html
- Previous message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Next message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]