Just a few days ago Guido proposed to adopt the Mypy syntax for type annotations in Python 3.5. There is a big discussion going on on the python-ideas mailing list about that and the general idea of having optional static typing in Python:<p><a href="https://mail.python.org/pipermail/python-ideas/2014-August/028618.html" rel="nofollow">https://mail.python.org/pipermail/python-ideas/2014-August/0...</a><p><a href="https://mail.python.org/pipermail/python-ideas/2014-August/028742.html" rel="nofollow">https://mail.python.org/pipermail/python-ideas/2014-August/0...</a><p>Recommended reading for those interested in the topic.
I wrote a decorator-driven library to do optional type checking at runtime with no need for a special interpreter :)<p><a href="https://github.com/kislyuk/ensure" rel="nofollow">https://github.com/kislyuk/ensure</a><p>(Having optional static type checks in the core interpreter would be nice, though Alex Gaynor's concerns linked in another comment are very valid.)
Former HN discussion at: <a href="https://news.ycombinator.com/item?id=4561973" rel="nofollow">https://news.ycombinator.com/item?id=4561973</a><p>Although it seems that MyPy has done a lot of progress since, most notably adopting Python 3 syntax for type annotations.
Has anyone used this with Django? If it works well I might replace Ruby with Mypy.<p>Doing iOS (with Swift) for a while has made me dislike not having static typing.