I just wanted to thank Matthew & Pradeep for writing this PEP and for clarifications to the broader context of PEP 646 for array typing in https://github.com/python/peps/pull/1904.

As someone who is heavily involved in the Python numerical computing community (e.g., NumPy, JAX, Xarray), but who is not so familiar with the details of Python's type system, it is reassuring to see that a broad range of use-cases related to type checking of named axes & shapes have been considered, and could build upon the infrastructure in this PEP.

Type checking for shapes is something the NumPy community is very interested in -- there are more thumbs up on the relevant issue on NumPy's GitHub than any others (https://github.com/numpy/numpy/issues/7370) and we recently added a "typing" module that is under active development.

It will certainly require experimentation to figure out the best ways to use type checking for ndarrays, but this PEP looks like an excellent foundation for such work.

On Sat, Mar 20, 2021 at 9:52 AM Matthew Rahtz via Python-Dev <python-dev@python.org> wrote:
Hi everyone,

We've got to the stage now with PEP 646 that we're feeling pretty happy with it. So far though we've mainly been workshopping it in typing-sig, so as PEP 1 requires we're asking for some feedback here too before submitting it to the steering council.

If you have time over the next couple of weeks, please take a look at the current draft and let us know your thoughts: https://www.python.org/dev/peps/pep-0646/ (Note that the final couple of sections are out of date; https://github.com/python/peps/pull/1880 clarifies which grammar changes would be required, now that PEP 637 has been rejected. We also have a second PR in progress at https://github.com/python/peps/pull/1881 clarifying some of the motivation.)

Thanks!
Matthew and Pradeep
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/5GWS2GGVJ4PAMOWM6YVVKZVMR5BRFRGV/
Code of Conduct: http://python.org/psf/codeofconduct/