On 06/23/2020 02:48 PM, Barry Warsaw wrote:
On Jun 23, 2020, at 13:50, Ethan Furman <et...@stoneleaf.us> wrote:

On 06/23/2020 12:49 PM, Barry Warsaw wrote:

Maybe the PEP could support this syntax:
     case in 401, 403, 404:
That seems like it would be both unambiguous and semantically obvious.

Unfortunately, that means:

  Is the object a three-tuple with the values 401, 403, and 404?

It would mean: is the object *in* a 3-tuple with values 401, 403, and 404, 
right?

If I understand the PEP correctly, then

  some_obj == (401, 403, 404)
  match some_obj:
      case 401, 403, 404:
          # this matches

--
~Ethan~
_______________________________________________
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/UBF7DNPS2TMKWPPB32DB6GA6YQKRCHKW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to