[Python-Dev] Dropping __init__.py requirement for subpackages
Ian Bicking
ianb at colorstudy.com
Thu Apr 27 00:35:20 CEST 2006
Joe Smith wrote:
> It seems to me that the right way to fix this is to simply make a small
> change to the error message.
> On a failed import, have the code check if there is a directory that would
> have been the requested package if
> it had contained an __init__ module. If there is then append a message like
> "You might be missing an __init__.py file".
+1. It's not that putting an __init__.py file in is hard, it's that
people have a hard time realizing when they've forgotten to do it.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Python-Dev
mailing list