TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mypy – static type checking for Python 3

70 pointsby HerrMonnezzaalmost 11 years ago

5 comments

ceronmanalmost 11 years ago
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:&#x2F;&#x2F;mail.python.org&#x2F;pipermail&#x2F;python-ideas&#x2F;2014-August&#x2F;0...</a><p><a href="https://mail.python.org/pipermail/python-ideas/2014-August/028742.html" rel="nofollow">https:&#x2F;&#x2F;mail.python.org&#x2F;pipermail&#x2F;python-ideas&#x2F;2014-August&#x2F;0...</a><p>Recommended reading for those interested in the topic.
评论 #8192252 未加载
评论 #8193213 未加载
ak217almost 11 years ago
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:&#x2F;&#x2F;github.com&#x2F;kislyuk&#x2F;ensure</a><p>(Having optional static type checks in the core interpreter would be nice, though Alex Gaynor&#x27;s concerns linked in another comment are very valid.)
评论 #8192412 未加载
HerrMonnezzaalmost 11 years ago
Former HN discussion at: <a href="https://news.ycombinator.com/item?id=4561973" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;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.
seivanalmost 11 years ago
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.
Goranekalmost 11 years ago
It would be awesome to combine pypy and mypy. Pypy could probable use static typing to gain some speed.
评论 #8192135 未加载