On 25/02/2022 14.30, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2022-02-25 at 13:48:32 -0600,
"Michael F. Stemper" <michael.stem...@gmail.com> wrote:

On 25/02/2022 12.07, Abdur-Rahmaan Janhangeer wrote:

I have been following language feature proposals from various
languages. Some decide to avoid Python's route, but others have been
trying hard to catch up with Python.  One gleaming example is the
switch case. JS recently proposed pattern matching, referencing
Python and explaining why the proposal is a cool treatment of the
usecase.

I'm not clear on what you mean here. JavaScript has had a switch/case
construct since 1.2, in the late 1990s. As far as I can determine,
python has no such thing, since PEP-3103 was rejected in 2007.

Python has a relatively new (as of version 3.10) "match" statement:

     https://docs.python.org/3/reference/compound_stmts.html#the-match-statement

Looks as if I have some reading to do. Thanks.


--
Michael F. Stemper
Always use apostrophe's and "quotation marks" properly.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to