3 ms·
> we are moving towards strictly typed Python I don't know what "strictly typed Python" is, but the type checking discussed in this post is 1) completely optio
by nchammas 10y ago
> we are moving towards strictly typed Python
I don't know what "strictly typed Python" is, but the type checking discussed in this post is 1) completely optional and 2) static. You don't have to do it if you don't want to, and even if you do do it, it doesn't affect in any way Python's runtime behavior or flexibility. You can have a codebase that works fine yet at the same time fails mypy's checks.
Also, no, we are not moving towards "strictly typed Python", even if that were a thing. PEP 484, which laid out the standard type hints, included this line in bold under "Non-goals" [0]:
> It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention.
[0] https://www.python.org/dev/peps/pep-0484/#non-goals https://www.python.org/dev/peps/pep-0484/#non-goals