This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk
Date 2021-07-15.18:31:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626373898.62.0.7619618577.issue44648@roundup.psfhosted.org>
In-reply-to
Content
[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.
History
Date User Action Args
2021-07-15 18:31:38andrei.avksetrecipients: + andrei.avk
2021-07-15 18:31:38andrei.avksetmessageid: <1626373898.62.0.7619618577.issue44648@roundup.psfhosted.org>
2021-07-15 18:31:38andrei.avklinkissue44648 messages
2021-07-15 18:31:38andrei.avkcreate