[Python-Dev] Dropping __init__.py requirement for subpackages

Terry Jones tcj25 at cam.ac.uk
Wed Apr 26 22:28:56 CEST 2006


It might be helpful to consider how people would tackle Guido's problem by
pretending that a regular Joe (i.e., someone who couldn't consider changing
the semantics of Python itself) had asked this question.

I would suggest adding a hook to their version control system to
automatically create (and preferably also check out) an __init__.py file
whenever a new (source code) directory was placed under version control
(supposing you can distinguish source code directories from the check in
dirname).  From one point of view this is a file system issue, so a file
system solution might be a good way to solve it. This approach would also
allow you to add this behavior/support on a per-user basis.

Terry


More information about the Python-Dev mailing list