<div dir="ltr">I provided a decorator recipe to do just what Chris Angelico describes a year or two before PEP 484 described static typechecking.  I think what I do is a consistent subset of PEP 484 still, modulo the difference between runtime and static.<div><br></div><div>See: <a href="http://code.activestate.com/recipes/578528-type-checking-using-python-3x-annotations/">http://code.activestate.com/recipes/578528-type-checking-using-python-3x-annotations/</a><br><div><br></div><div>It would be a lot more work to do everything the typing.py module and PEP 484 describes (algebraic typing, basically), but it's all just code that is compatible back to Python 3.0.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 3:34 AM, Paul Moore <span dir="ltr"><<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8 July 2016 at 10:35, Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br>
>> Anyway, I just throw an idea to here. Greet to all of you for bring<br>
>> Python to me.<br>
><br>
> Keep on throwing ideas this way! Ideas are great. Well-thought-out<br>
> ideas make for interesting discussions, even if they don't get<br>
> implemented. Often the answer ends up being "here's a way to do this<br>
> with the current version", but it doesn't carry with it a tag of "and<br>
> you're an idiot for even suggesting it". We like ideas here -<br>
> otherwise we wouldn't subscribe to this list :)<br>
<br>
</span>Agreed! I'd have never even thought of Chris' decorator approach<br>
before this discussion occurred, so thanks for raising the subject. I<br>
may never use it, but knowing how to do something like this is great.<br>
<span class="HOEnZb"><font color="#888888"><br>
Paul<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" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons.  Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br></div>
</div></div>