[issue32313] Wrong inspect.getsource for datetime

Irit Katriel report at bugs.python.org
Sun Aug 23 14:37:36 EDT 2020


Irit Katriel <iritkatriel at yahoo.com> added the comment:

The documentation for getfile says "This will fail with a TypeError if the object is a built-in module, class, or function."

https://docs.python.org/3/library/inspect.html#inspect.getfile

But it doesn't:
>>> inspect.getfile(datetime.datetime)
'C:\\Users\\User\\src\\cpython\\lib\\datetime.py'

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32313>
_______________________________________


More information about the Python-bugs-list mailing list