New submission from Anand Reddy Pandikunta:
>>> inspect.getsource(sys.excepthook)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/inspect.py", line 701, in getsource
lines, lnum = getsourcelines(object)
File "/usr/local/lib/python2.7/inspect.py", line 690, in getsourcelines
lines, lnum = findsource(object)
File "/usr/local/lib/python2.7/inspect.py", line 526, in findsource
file = getfile(object)
File "/usr/local/lib/python2.7/inspect.py", line 420, in getfile
'function, traceback, frame, or code object'.format(object))
TypeError: <built-in function excepthook> is not a module, class, method,
function, traceback, frame, or code object
----------
components: Library (Lib)
files: trace4.py
messages: 241537
nosy: ChillarAnand
priority: normal
severity: normal
status: open
title: inspect.getsource is failing for sys.excepthook
versions: Python 2.7
Added file: http://bugs.python.org/file39124/trace4.py
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24008>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com