elements-of-python-style
elements-of-python-style copied to clipboard
Add a note about the typing module and gradual typing
I was listening to a Python coding standards talk today and there was a lot of discussion of typing
in 3.x, mypy
, and other related tools. This obviously introduces a slew of style questions -- off the top of my head:
- should you introduce
typing
to a project, even if it mixes typed and non-typed code? - should you use
mypy
or similar type checkers as a standard part of a Python linting process, akin to usingflake8
? - how should the documentation advice (with reST and Sphinx etc.) be revised now that type annotations can be used directly on the code?
#48 is related.