3 ms·
Function annotations were added as part of Python 3.0, with PEP 3107, proposed in 2006 [0]. The first public mypy commit was in 2012 [1], and originally it was
by Kwpolska 4y ago
Function annotations were added as part of Python 3.0, with PEP 3107, proposed in 2006 [0]. The first public mypy commit was in 2012 [1], and originally it was using C++-style syntax (`list<Token> lex(str s):`). The `typing` module and the official use of function annotation for type hints came in 2014 with PEP 484 [2], inspired by mypy. The first pyright commit was in 2019 (with a lot of code in the third commit [3], possibly moved from the VSCode extension).
[0] https://peps.python.org/pep-3107/ https://peps.python.org/pep-3107/
[1] https://github.com/python/mypy/commit/6f0826a9c169c4f05bb8938347ac0416f8154d91 https://github.com/python/mypy/commit/6f0826a9c169c4f05bb893...
[2] https://peps.python.org/pep-0484/ https://peps.python.org/pep-0484/
[3] https://github.com/microsoft/pyright/commit/1d91744b1f268fd088be86df8f2afb205af7019b https://github.com/microsoft/pyright/commit/1d91744b1f268fd0...