On 16/01/21 2:09 pm, Guido van Rossum wrote:
Yeah, that wasn't very clear, and I'm not 100% sure I got it right. But
consider this:
```
class Outer:
foo = 1
class Inner:
print(foo)
That's true. So maybe the user should have to be explicit in
cases like this:
class Outer:
class Inner:
def f(x: Outer.Inner): ...
However, I think cases like this should work:
class C:
t = List[int]
def f(x: t): ...
even though the closure placed in C.__co_annotations__ wouldn't
normally have access to t without qualification.
--
Greg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/YTZ3QRG3V6URZ3FDOZ6QON5DSYC52HGI/
Code of Conduct: http://python.org/psf/codeofconduct/