News for hackers. Stuff that matters.
Re:PEP 622 – Structural Pattern Matching by BiteCode_dev on Wednesday June 24, 2020 @10:35AM (#23628327)
I know.

It doesn't bother me since I see that match/case is a whole different context, I know I'm matching, and have no reason to instanciate anything here.

But since Foo(a=1) looks like instanciation, it's obvious to me what it's supposed to match.

I think that's one of the things that motivated to:

- use new keywords, but existing ones like "as", nor symbols;

- force 2 levels of indentation despite the cost of it.

This makes it very clear, with little effort, that the context is completly different.

It will make scanning the code easy, and avoid confusion.

There are no comments on this comment yet.