Python creator Guido van Rossum’s proposal for static type-checking annotations is inching closer to reality, and the feature has taken on a new name: type hinting.
Back in August, van Rossum published a proposal on the Python mailing list recommending type-checking annotations as a valuable feature for the next version of Python to improve the performance of editors and IDEs, linter capabilities, standard notation, and refactoring. Van Rossum’s latest proposal, posted late last month, outlined plans to publish a Python Enhancement Proposal (PEP) in early January to put the feature now known as type hinting on track for inclusion in Python 3.5, slated for release this September.
Along with the proposal, the Python author also posted a more fully formed theoretical document, “The Theory of Type Hinting,” laying out the basics of the proposal summarizing gradual typing, notational conventions, general rules, pragmatics, and the types themselves. According to van Rossum, the entire runtime component proposal can be implemented as a single pure Python module, using square brackets for generic types.
Type hinting is inspired by the notation syntax of the Mypy static Python type checker, and rather than create an entirely new static type checker, van Rossum hopes to include a version of the modified typing.py module from Mypy in the Python 3.5 alpha 4 release.
Van Rossum’s type-hinting PEP should be officially submitted this month, and he plans to speak about the new Python feature at the PyCon conference in Montreal in April.