[issue12583] More detailed ImportError messages

Brett Cannon report at bugs.python.org
Thu Jul 21 00:26:25 CEST 2011


Brett Cannon <brett at python.org> added the comment:

For the ImportWarning docs, there could stand to be more; patches welcome. =)

As for ImportError being postmortem on an error, that is not always true as plenty of people use the trick, e.g.:

try: import json
except ImportError: import simplejson as json

As for detecting circular imports, flagging it somehow might work, but directly analyzing the stack won't do since that is extremely costly on some VMs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12583>
_______________________________________


More information about the Python-bugs-list mailing list