3 ms·
The `match` statement, slated for the next version of Python (3.10), is rather comprehensive. Don't think we could reasonably expect much more than this to be r
by frou_dh 6y ago
The `match` statement, slated for the next version of Python (3.10), is rather comprehensive.
Don't think we could reasonably expect much more than this to be retrofitted into an old language [0]
https://www.python.org/dev/peps/pep-0622/#exhaustiveness-checks https://www.python.org/dev/peps/pep-0622/#exhaustiveness-che...
https://www.python.org/dev/peps/pep-0634/ https://www.python.org/dev/peps/pep-0634/
[0] Trivia: Python is older than Linux!
- adenozine 6y agoI'm so excited for match to become a thing. Honestly, exhaustiveness had kept me from using Python for some work that I'd have otherwise loved to use it! I enjoy FP and some of the other benefits of Ocaml, which is what I use for programs where Mypy can't give me what I need. But at the end of the day, I'm just not as nimble with it, and I can just see the python in my head so much easier.
- jackric 6y agoVery exciting for experienced developers missing this from other languages, but I predict the growing spec of Python is leading it away from the "my first language" crowd in future.