News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by pfalcon on Wednesday February 10, 2021 @04:21PM (#26094985)
First of all, macro systems for Python exist for decades (just as long as pattern matching, and indeed, many patmatching implementations are done as macros). One well-know example of both is https://macropy3.readthedocs.io/en/latest/pattern.html

Secondly, there's a PEP to embrace macros in CPython (instead of pretending they don't exist, and leaving that to external libraries): https://www.python.org/dev/peps/pep-0638/

But the point, you don't need to wait for official PEP to use macros in Python. If you wanted, you could do that yesterday (== decades ago). And I guess in absolute numbers, the same amount of people use macros in Python as in Scheme. It's just in relative figures, it's quite different, given that there're millions of Python users.

Re:Pattern matching accepted for Python by jnxx on Thursday February 11, 2021 @04:48AM (#26099834)
So, if it isn't finished, why do people not use pattern matching implemented as a macro, until things like scoping are ironed out?
Re:Pattern matching accepted for Python by pfalcon on Saturday February 13, 2021 @04:34AM (#26122514)
For as long as you're a human and belong to category of "people", you can answer that question as good as anyone else. And your answer is ...?

(Just in case my answer is: https://github.com/pfalcon/python-imphook , yet another (but this time unsucky, I swear!) module which allows people to implement macros (among other things)).