We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56d1835 commit 49d11e6Copy full SHA for 49d11e6
Lib/inspect.py
@@ -844,7 +844,7 @@ def getfile(object):
844
if getattr(object, '__file__', None):
845
return object.__file__
846
if getattr(object, '__spec__', None) is not None:
847
- raise TypeError(f'{object!r} is a built-in module')
+ raise TypeError(f'{object!r} is: {object.__spec__.origin}')
848
raise TypeError(f'cannot get source from {object!r}')
849
if isclass(object):
850
if hasattr(object, '__module__'):
0 commit comments