[Python-Dev] Fix import errors to have data

Jim Fulton jim at zope.com
Tue Jul 27 19:07:01 CEST 2004

Tim Peters wrote:
> [Jim Fulton]
>>No.  I'm proposing a way for a Python developer to detect the
>>presence or absence of a module.
> Seems to me a module is present if and only if you try to import it,
> and the import succeeds, or the import fails and the module name is in
> sys.modules after.

That's a definition I don't really care for at all.
It's like saying that an object has an attribute if
trying to get the attribute doesn't raise an error. :)

Seems to me a module isn't present if it's implementation
isn't in an import path.  To me a module is broken if it
has an implementation that fails.


Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org

More information about the Python-Dev mailing list