-
-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Please consider PEP 646 for inclusion in Python 3.10. This is primarily of interest to users of static type checkers, especially projects looking to implement shape checking for tensors (an important concept in the machine learning world, where Python's dominance is seeing competition from e.g. Swift for Tensorflow).
There are some small additions to Python's syntax in the proposal, namely the * operator in subscripts and for *args in function definitions. These are essentially just new uses of the existing "sequence unpacking" concept.
The PEP has been discussed at length in the typing sig, and the python-dev mailing list has been notified.
There are reference implementations of the checking part in Pyright and Pyre. There is a nascent patch for the syntactic changes to CPython where.
/CC: @mrahtz