Larry Hastings <la...@hastings.org> added the comment:

"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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37923>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to