<div dir="ltr"><div><div>In principle, I like this idea, this will save some keystrokes<br>and will make annotated code more "beautiful". But I am quite worried about the backwards<br></div>compatibility. One possible idea would be to use __future__ import without a definite<br>deprecation plan. If people will be fine with using typing.get_type_hints<br>(btw this is already the preferred way instead of directly accessing __annotations__,<br>according to PEP 526 at least) then we could go ahead with deprecation.<br></div><div><br></div><div>Also I really like Yury's idea of dynamic mapping, but it has one downside,</div><div>semantics of this will change:</div><div><br></div><div>    def fun(x: print("Function defined"), y: int) -> None:</div><div>        ...</div><div><br></div><div>However I agree functions with side effects in annotations are very rare,</div><div>and it would be reasonable to sacrifice this tiny backwards compatibility</div><div>to avoid the __future__ import.<br></div><div><br>--<br></div>Ivan<br><br><br></div>