[Python-Dev] ImportWarning flood
steve at holdenweb.com
Tue Jun 27 09:15:40 CEST 2006
Ralf W. Grosse-Kunstleve wrote:
> --- 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":
> Traceback (most recent call last):
> File "<stdin>", 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
Yeah, that'll really help the end-user whose sys admin has just upgraded
to 2.5, won't it?
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-Dev