On 25/06/20 7:50 pm, Anders Munch wrote:
Pascal is a precedent for this placement of 'case',

Yes, but it doesn't use it with "match". In fact it doesn't have
any keyword in front of the values to be matched; it goes like

   case n of
      1: ...;
      2: ...;
      3: ...;
   end

If we did that in Python it would look like this:

   case shape:
      Point(x, y):
         ...
      Line(x1, y1, x2, y2):
         ...
      Circle(cx, cy, r):
         ...

What think folks of this?

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

Reply via email to