News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by jgtrosh on Wednesday February 10, 2021 @02:19AM (#26086432)
The behaviour my intuition would have expected is that if a variable is currently in scope, then it is considered as a literal match, otherwise it's a capture match.

I suppose there's an obvious flaw to that behaviour, though.

Re:Pattern matching accepted for Python by pfalcon on Wednesday February 10, 2021 @04:57AM (#26087338)
No, that's not robust. The idea was simple - to use explicit marker like:

case == FOO: case is True:

That was part of PEP642, but it ended up containing more other questionable things. I hope that particular point will be separated and implemented.