Message397573
[ins] In [63]: class A:pass
[ins] In [64]: import inspect
[ins] In [65]: inspect.getsource(A)
[snip]
/usr/local/Cellar/python@3.9/3.9.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/inspect.py in getfile(object)
664 if getattr(module, '__file__', None):
665 return module.__file__
--> 666 raise TypeError('{!r} is a built-in class'.format(object))
The error is 'X is a built-in class', instead it should be OSError, source code is not available. |
|
Date |
User |
Action |
Args |
2021-07-15 18:31:38 | andrei.avk | set | recipients:
+ andrei.avk |
2021-07-15 18:31:38 | andrei.avk | set | messageid: <1626373898.62.0.7619618577.issue44648@roundup.psfhosted.org> |
2021-07-15 18:31:38 | andrei.avk | link | issue44648 messages |
2021-07-15 18:31:38 | andrei.avk | create | |
|