New submission from Aaron Meurer <asmeu...@gmail.com>: inspect.getsource(datetime) shows the Python source code for datetime, even when it is the C extension. This is very confusing.
I believe it's because _datetime is used to override everything in datetime at the end of the file (here https://github.com/python/cpython/blob/11a247df88f15b51feff8a3c46005676bb29b96e/Lib/datetime.py#L2285), but __file__ is not imported. ---------- messages: 308255 nosy: Aaron.Meurer priority: normal severity: normal status: open title: Wrong inspect.getsource for datetime _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32313> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com