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 hongweipeng
Recipients FFY00, ezyang, gvanrossum, hongweipeng, jonathan.slenders, mauvilsa, ralf.gommers, serhiy.storchaka, yselivanov
Date 2021-07-16.09:25:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626427523.1.0.22619079792.issue40897@roundup.psfhosted.org>
In-reply-to
Content
>>> from datetime import timedelta as a
>>> from _datetime import timedelta as b
>>> a is b
True
>>>

`timedelta` is a C-level class, so inspect.signature(timedelta) is the same with inspect.signature(int).

But `signature` allow C-level function such as `inspect.signature(len)`, I think one way to improve is to use the C-level function when the python-level function cannot be found.
History
Date User Action Args
2021-07-16 09:25:23hongweipengsetrecipients: + hongweipeng, gvanrossum, ezyang, serhiy.storchaka, yselivanov, ralf.gommers, jonathan.slenders, mauvilsa, FFY00
2021-07-16 09:25:23hongweipengsetmessageid: <1626427523.1.0.22619079792.issue40897@roundup.psfhosted.org>
2021-07-16 09:25:23hongweipenglinkissue40897 messages
2021-07-16 09:25:22hongweipengcreate