Yes, you’ve got that exactly right! I think the pep has an example for tuple((x, y)).
On Thu, Jul 9, 2020 at 13:08 Rob Cliffe via Python-Dev < python-dev@python.org> wrote: > One thing I don't understand about the PEP: > > case [x,y]: > > IIUC matches any 2-element sequence. > How would you match specifically a 2-item list (say)? > Would it be > > case list([x,y]): > > I would appreciate it if some kind person could enlighten me. > TIA > Rob Cliffe > _______________________________________________ > 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/NJLVOPNAZIDOCYYGJ2RJKK23ZK5FCLXT/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido (mobile)
_______________________________________________ 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/27JPO3DSAPYDL5TN6OVIOOW4WATEIYGX/ Code of Conduct: http://python.org/psf/codeofconduct/