Guido van Rossum <gu...@python.org> added the comment:
> Does anyone know why the treatment of unresolved references was changed in > 3.9? Probably to prepare for 3.10, where `from _future__ import annotations` is the default. > Also, I'm a bit puzzled about something from the previously mentioned Integer > class and its use of __future__.annotations. > > Why is it possible to declare an Integer return type for the add() method, > but only possible to declare an "Integer" forward reference for the _() > method? I don't know -- you might want to look through the source code of singledispatch. Maybe the flow through the initial decorator is different than the flow through register(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41987> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com