<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 16, 2015 at 5:57 PM, Cem Karan <span dir="ltr"><<a href="mailto:cfkaran2@gmail.com" target="_blank">cfkaran2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
</div></div>If we're using decorators for the annotations, why not use them for the typing as well?</blockquote><div><br></div><div>Because annotations were intended for type hints.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">E.g.,<br>
<br>
@typing.type(a, int)<br>
@doc.doc(a, "some doc")<br>
def f(a):<br>
    pass<br>
<br>
This would be the equivalent of:<br>
<br>
def f(a: {"typing.type": int, "doc.doc": "some doc"}):<br>
    pass<br>
<br>
The whole dictionary idea will be hidden, and annotations can be used for other purposes while still supporting typing information.  I'll admit that stacking the decorators means the code could get very deep, but it still feels like the least bad thing to do.<br></blockquote></div><br></div><div class="gmail_extra">You're taking this "nobody should be more equal than others" thing too far. :-) We're trying to come up with a standard way of doing one very important thing.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div></div>