Just had another thought about marking assignment targets.
The PEP currently forbids repeating bound names in a pattern
to avoid raising expectations that
case Point(x, x):
would match only if the two arguments were equal.
But if assignment targets were marked, we could write this as
case Point(?x, x):
and it would work as expected.
--
Greg
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/WHZAXSISMTBCCMNXZ7FBK73ERG5RIOHQ/
Code of Conduct: http://python.org/psf/codeofconduct/