[Python-ideas] Delay evaluation of annotations
Stephen J. Turnbull
turnbull.stephen.fw at u.tsukuba.ac.jp
Sat Sep 24 20:43:40 EDT 2016
אלעזר writes:
> But to do that I still need an example for the stromgest issue
> raised - bacwards compatibility.
Given that Nick has misgivings about the ease of actually implementing
this, I think you need to present an implementation, and then we talk
about how closely it approximates backward compatibility.
> Again, I assume ".__annotations__" access evaluates them in the original
> context.
You don't get to assume that, without an implementation that shows how
you work around the "def can't see names of lambda arguments" issue.
At the very least you need to define "evaluate in original context"
operationally -- the "original context" as I understand it is what is
visible the current implementation, but that is clearly not what you
mean. Of course an implementation would serve to define that.
More information about the Python-ideas
mailing list