Thank you Guido, Brandt Bucher, Tobias Kohn, Ivan Levkivskyi and Talin
for this fun and very useful new feature.
I do enjoy pattern matching a lot in Elixir—my favorite language these
days, after Python.
I don't want to start a discussion, but I just want to say that as an
instructor I fear this core language addition may make the language
less approachable to the non-IT professionals, researchers etc. who
have saved Python from the decline that we can observe happening in
Ruby—a language of similar age, with similar strengths and weaknesses,
but never widely adopted outside of the IT profession.
After I wrap up Fluent Python 2e (which is aimed at professional
developers) I hope I can find the time to tackle the challenge of
creating introductory Python content that manages to explain pattern
matching and other recent developments in a way that is accessible to
Hold on a while. This feature does not exist. This PEP has not been accepted. Don't count your chickens.py before they hatch.
The last P in PEP stands for Proposal for a reason. Rejection is a perfectly valid option. As is a significant reworking of the proposal so that it doesn't turn into a nightmare. This one needs a lot of work at a minimum. As proposed, it is extremely non-approachable and non-trivial.