STINNER Victor <vstin...@python.org> added the comment:
> The second problem is `inspect.signature`. If we don't resolve annotations > there and continue it is definitely going to break some code. Would you mind to elaborate why would it break some code? Consumers of annotations should already be prepared to get directly types or strings, no? > If we resolve, that would mean that annotations must able to point something > real (and this might not be the real case if the user uses a string > annotation etc.) and will break code. (both tried and both breaks different > modules on the stdlib tests) I expect that resolving has an impact on performance, whereas the caller may not use annotations at all but only cares of the number of parameters or their name. It would be resonable to not resolve annotations in signature() by default. If someone cares, maybe a new parameter can be added to resolve annotations? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38605> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com