Apparently the PEP authors decided to punt on what they call "algebraic matching" of repeated names. IMNSHO, if this PEP isn't doing algebraic matching then it's really far from clear what it's for, ...
import matching # ... if m := matching.match(p, (matching.capture('x'), matching.capture('x')): print("Diagonal at %d" % (m.x,)) elif m := matching.match(p, (0 ...