[Python-Dev] Dropping init.py requirement for subpackages (original) (raw)
Guido van Rossum guido at python.org
Wed Apr 26 19:46:21 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/26/06, Benji York <benji at benjiyork.com> wrote:
Guido van Rossum wrote: > So I have a very simple proposal: keep the init.py requirement for > top-level pacakages, but drop it for subpackages.
So this would mean that current non-package subdirectories in a package (that contain things like data files or configuration info) would become packages with no modules in them?
Yup. Of course unless you try to import from them that wouldn't particularly hurt, except if the subdir name happens to be the same as a module name.
Note that absolute import (which will be turned on for all in 2.6) will solve the ambiguity; the only ambiguity left would be if you had a module foo.py and also a non-package subdirectory foo. But that's just asking for trouble.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- 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 ]