Best way to check if there is internet?

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Fri Feb 25 15:30:59 EST 2022


On 2022-02-25 at 13:48:32 -0600,
"Michael F. Stemper" <michael.stemper at 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


More information about the Python-list mailing list