3 ms·
Python 3 has function annotations and you can use it for static type checks. See this: http://www.infoq.com/news/2014/08/python-type-annotation-proposal http:/
by albertzeyer 12y ago
Python 3 has function annotations and you can use it for static type checks. See this:
http://www.infoq.com/news/2014/08/python-type-annotation-proposal http://www.infoq.com/news/2014/08/python-type-annotation-pro...
https://mail.python.org/pipermail/python-ideas/2014-August/028618.html https://mail.python.org/pipermail/python-ideas/2014-August/0...
http://mypy-lang.org/ http://mypy-lang.org/
https://docs.python.org/3/tutorial/controlflow.html#function-annotations https://docs.python.org/3/tutorial/controlflow.html#function...
- andreasvc 12y agoThose are only checks, and don't make your code faster (in fact, slower, when checks are enabled). To get efficiency benefits you need a language/compiler designed around static typing. Cython offers a superset of Python that can be statically typed.