El lun, 15 mar 2021 a las 13:13, Guido van Rossum (<guido@python.org>) escribió:
Let me clarify what the typing-sig folks wanted out of this PEP. We only care about adding support for `x[*y]` (including things like `x[a, *b, c]`). We'll just update PEP 646 to add that explicitly there and hope that PEP 646 fares better than PEP 637.
To fans of PEP 637 I would call out that the main reason for rejection seems to be this paragraph:
The benefits of the new syntax as outlined in the PEP are not particularly
strong, and community support for the new syntax seems low. The new syntax doesn’t provide an obvious way to do something that is currently error-prone, and doesn’t open up new possibilities that were not possible before. While there are certainly cases that could use the new syntax, for many of them it’s not clear that it would be a win, or that third-party libraries would indeed use the syntax. The Steering Council isn’t really convinced by any of the suggested uses in the PEP.
This seems to imply that in order for a proposal like this to fare better in the future, the authors would need to line up support from specific, important communities like the scientific, data science or machine learning communities. Currently such support seems absent except for one specific package (xarray).
Yes, I was surprised to read the focus on typing in the rejection notice because my recollection from the discussions around PEP 637 was that typing was not in fact the major motivation, named column indexing was.
Looking at the PEP's motivation section now ( https://www.python.org/dev/peps/pep-0637/#use-cases), two (#2 and #7) are about typing. #2 ("MyType[T=int]") is rather weak, since "T=int" doesn't provide any increase in clarity over just "int". #7 (PEP 646) is stronger, but was tacked on later and doesn't provide much detail. Among the other use cases, #1 and #3 are quite general. The compelling ones to me are #4 (pandas), #5 (xarray) and #7 (trio.run and similar functions). Focusing more on these use cases would have made the PEP's motivation more similar to matrix multiplication (PEP 465): helping the scientific Python stack make a construct that's currently awkward more simple.
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/> _______________________________________________ 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/MOXRTWGV... Code of Conduct: http://python.org/psf/codeofconduct/