News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by hnlmorg on Wednesday February 10, 2021 @03:02AM (#26086644)
No it’s not because it’s none obvious and requires a fair amount of boilerplate code. Both of which are usually idioms Python normally tries to avoid.

I guarantee you this will trip up a lot of developers who are either learning the language for the first time or who Python isn’t their primary language.

Worse still, the kind of bugs this will lead to is valid code with unexpected pattern matching, which is a lot harder to debug than invalid code which gets kicked out with a compiler error.

There are no comments on this comment yet.