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 < [email protected]> 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 -- [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/NJLVOPNAZIDOCYYGJ2RJKK23ZK5FCLXT/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido (mobile)
_______________________________________________ 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/27JPO3DSAPYDL5TN6OVIOOW4WATEIYGX/ Code of Conduct: http://python.org/psf/codeofconduct/
