Skip to content

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 12, 2025

Preview:

Снимок экрана 2025-09-13 в 01 18 21

What do you think? :)

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this but I wonder how often people may fall into this... I don't think is a bad idea I cannot see anything wrong with the grammar since the short circuit is NAME + NAME. Does this trigger for case match: (afk atm so I cannot check myselef) ?

@sobolevn
Copy link
Member Author

@pablogsal here's the result :)
Снимок экрана 2025-09-13 в 02 38 41

@sobolevn
Copy link
Member Author

sobolevn commented Sep 12, 2025

I am fine with this but I wonder how often people may fall into this

I always try to report parsing problems from errors that I make myself that make me scratch my head. Today I wrote this code while reviewing this PR: wemake-services/wemake-python-styleguide#3526

case some:  # <- should be `match`
    case other: ...

and I was like: what's wrong? Why is there a syntax error?

It was not easy to mention, especially given that some languages like gleam do start pattern matching with case, not match :)

@pablogsal
Copy link
Member

I am fine with this but I wonder how often people may fall into this

I always try to report parsing problems from errors that I make myself that make me scratch my head. Today I wrote this code while reviewing this PR: wemake-services/wemake-python-styleguide#3526

case some:  # <- should be match
    case other: ...

and I was like: what's wrong? Why is there a syntax error?

It was not easy to mention, especially given that some languages like gleam do start pattern matching with case, not match :)

Sold! Ok, let's get it in I think is a good idea. I was tempted to suggest getting:

case some:  # <- should be match
    case other: ...

as "maybe you mean match" but that's going to be a can of worms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants