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 larry
Recipients JelleZijlstra, dmontague, eric.snow, larry, levkivskyi, yselivanov
Date 2021-05-03.01:04:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620003865.83.0.184186367424.issue37923@roundup.psfhosted.org>
In-reply-to
Content
"Type hints" and "annotations" aren't the same thing.  And type hints are more opinionated about the values of annotations than would be appropriate for the inspect module.  For example, typing.get_type_hints() wraps strings with ForwardRef, turns None into NoneType, and it ignores objects with a "__no_type_check__" attribute.

So, I think it might be okay to *add* a *new* function to the typing module that was equivalent to inspect.signature() (and typing.signature() seems like a good name here).  I don't use type hints, so I don't have a strong opinion on that either way.  But you definitely shouldn't modify inspect.signature() so it produces type hints.
History
Date User Action Args
2021-05-03 01:04:25larrysetrecipients: + larry, eric.snow, yselivanov, levkivskyi, JelleZijlstra, dmontague
2021-05-03 01:04:25larrysetmessageid: <1620003865.83.0.184186367424.issue37923@roundup.psfhosted.org>
2021-05-03 01:04:25larrylinkissue37923 messages
2021-05-03 01:04:25larrycreate