[Python-Dev] ImportWarning flood (original) (raw)

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sat Jun 24 19:29:20 CEST 2006


--- Jean-Paul Calderone <exarkun at divmod.com> wrote:

I think it is safe to say that Twisted is more widely used than anything Google has yet released. Twisted also has a reasonably plausible technical reason to dislike this change. Google has a bunch of engineers who, apparently, cannot remember to create an empty init.py file in some directories sometimes.

Simply adding a note to the ImportError message would solve this problem "just in time":

import mypackage.foo Traceback (most recent call last): File "", line 1, in ? ImportError: No module named mypackage.foo Note that subdirectories are searched for imports only if they contain an init.py file: http://www.python.org/doc/essays/packages.html


Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com



More information about the Python-Dev mailing list