On 13/07/2020 12:28, Henk-Jaap Wagenaar wrote:
No, that would not be impossible but fraught with problems. This is discussed in the PEP: https://www.python.org/dev/peps/pep-0622/#algebraic-matching-of-repeated-nam...
The PEP goes into no detail of what these problems (or "number of subtleties") are, but it does mention how
we decided to make repeated use of names within the same pattern an error; we can always relax this restriction later without affecting backwards compatibility which does hint at the fact that the problems are not insurmountable hurdles.
All in all not an urgent feature, but it would be nice to have from the get-go if there is agreement and it is doable. @PEP authors: Incidentally, I am eager to start contributing and see this PEP advance—if there's anything I can do, including possibly non-code "dirty work" please let me know. I was thinking of collecting all the objections and points of contention of the PEP and the current progress on each in one place so that the pros and cons can be evaluated more clearly. Would that be useful?