[issue17735] inspect.findsource throws IndexError

Kyle Simpson report at bugs.python.org
Tue Apr 16 05:15:45 CEST 2013


Kyle Simpson added the comment:

Right, this issue is about the IndexError.

The current patch for issue 1218234 doesn't solve this problem. You will still get IndexErrors, but you will get them when functions are removed rather than when functions are added.

I think we should simply throw an IOError instead of an IndexError. This matches the docstring and prevents help() from blowing up after reloading a module.

----------

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


More information about the Python-bugs-list mailing list