[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

R. David Murray report at bugs.python.org
Thu Jul 6 00:04:18 EDT 2017


R. David Murray added the comment:

Probably.  Figure out a protocol to inject them into linecache, perhaps.  But I'm not sure such a thing would be accepted.  If you can figure out a way to make it work at least theoretically, it would probably be best to talk about it on python-ideas first.

In the meantime it would be nice to improve the error message, which is what we should use this issue for.

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list