On Tue, Nov 3, 2020 at 8:53 AM Glenn Linderman <v+pyt...@g.nevcal.com> wrote: > > On 11/2/2020 1:42 PM, Guido van Rossum wrote: > > But we feel that `case x, x` can easily be misunderstood as "a tuple > > of two equal values" > > So what _is_ the syntax for "a tuple of two equal values" ? > > case x, ?x: # comes to mind (not that it is in the PEP :))
case x, y if x == y: If it gets a lot of demand, a dedicated syntax can be added in the future without breaking anything. ChrisA _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@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/574IVLKJKR2JF455MRRHUH23V7HEXX4I/ Code of Conduct: http://python.org/psf/codeofconduct/