Simon Percivall added the comment:

It think it's important to document this caveat in `get_type_hints`, that there 
is virtually _no_ way to use it safely with a class, and that there will always 
be a high risk of getting an exception unless using this function in a highly 
controlled setting.

This also, as a consequence, means that there is no "best-effort" support for 
collecting type hints from a class hierarchy, and every instance of trying to 
use this function with classes, or traversing __annotations__ "manually", will 
need to be solved ad-hoc and from scratch by the user (until someone publishes 
a "typing-utils" package on PyPI).

----------

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

Reply via email to