4 ms·
Original author here; I'm happy to answer any questions about the mypy experience!
by tabbott 10y ago
Original author here; I'm happy to answer any questions about the mypy experience!
- tantalor 10y agoWhy not put type annotations in docstrings?
- tabbott 10y agoThere's some discussion of this in PEP-484: https://www.python.org/dev/peps/pep-0484/#other-backwards-compatible-conventions https://www.python.org/dev/peps/pep-0484/#other-backwards-co....
- thristian 10y agoDoes Sphinx (or any other automated-documentation tool) read the MyPy annotations, or would I have to type them in twice, in different syntaxes, if I wanted types in my docs + linting? Or does type documentation not matter that much, once it's being enforced by a tool?
- RubyPinch 10y agothere is at least this, others might also exist https://pypi.python.org/pypi/sphinx-autodoc-annotation https://pypi.python.org/pypi/sphinx-autodoc-annotation
- muzakthings 10y agoDoes mypy see any performance improvements over vanilla python (because types are static)?
- detaro 10y agoNo, the interpreters make no use of annotations.