[issue43817] Add inspect.get_annotations()

Larry Hastings report at bugs.python.org
Sat Apr 24 03:41:23 EDT 2021


Larry Hastings <larry at hastings.org> added the comment:

For what it's worth: I changed the name to ONLY_IF_STRINGIZED in the PR.

Since I propose that it be the default, everyone who called inspect.get_annotations(), and inspect.signature(), would use it.  I think Pydantic would prefer it, because Pydantic wants to see the real objects at runtime, rather than the stringized annotations.

If stringized annotations were deprecated in the future, then eval_str should be deprecated at the same time.

----------

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


More information about the Python-bugs-list mailing list