<div dir="ltr">Sigh. I guess I'll have to do this. <a href="https://github.com/ambv/typehinting/issues/55">https://github.com/ambv/typehinting/issues/55</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 5:33 AM, Fetchinson . <span dir="ltr"><<a href="mailto:fetchinson@googlemail.com" target="_blank">fetchinson@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It looks like type hinting as a feature is applauded by everyone but<br>
the actual syntax/implementation is polarizing. Could we have a<br>
section in the PEP listing all alternative sytax/implementations with<br>
pros and cons? Stuff like:<br>
<br>
1. Stub files<br>
<br>
<br>
2. property-style type hinting, e.g.:<br>
<br>
    @typehints( arg1: int, arg2: str, returns: str )<br>
    def func( arg1, arg2 )<br>
        return 'hello'<br>
<br>
<br>
3. docstrings, e.g.:<br>
<br>
    def func( arg1, arg2 ):<br>
        """type hints: arg1: int, arg2: str, returns: str"""<br>
        return 'hello'<br>
<br>
4. Cobra-inspired type hints, e.g.:<br>
<br>
    def func( arg1, arg2 ):<br>
        requires:<br>
            isinstance( arg1, int )<br>
            isinstance( arg2, str )<br>
        returns:<br>
            str<br>
<br>
<br>
Cheers,<br>
Daniel<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Psss, psss, put it down! - <a href="http://www.cafepress.com/putitdown" target="_blank">http://www.cafepress.com/putitdown</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div>