Guido van Rossum <gu...@python.org> added the comment:

So the biggest difference I see is that ForwardRef._evaluate() has grown a 
recursive_guard argument in 3.9. This makes me think that in 3.8, only one 
level of evaluation was happening, and in 3.8, we keep evaluating until we 
don't see a string or ForwardRef.

The specific examples all happen at a point where the forward ref "C" cannot be 
resolved at all yet (since they're happening *in the class body*).

Possibly the best way out is to treat unresolved references differently, and 
just return the ForwardRef to the caller -- after all this is what the example 
does in 3.8.

----------

_______________________________________
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

Reply via email to