Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve error message forexcept a as b.c: case #123440

Closed
Assignees
sobolevn
Labels
@sobolevn

Description

@sobolevn

Feature or enhancement

Right now the syntax error is not very clear:
Снимок экрана 2024-08-28 в 21 00 51

I propose to instead use something like:
Снимок экрана 2024-08-28 в 20 59 42

@JelleZijlstra suggested to use similar error messages to:= case, where we also only expect a name:

>>> (a.b :=3)File"<unknown>",line1    (a.b :=3)^^^SyntaxError:cannotuseassignmentexpressionswithattribute>>> (a[0] :=3)File"<unknown>",line1    (a[0] :=3)^^^^SyntaxError:cannotuseassignmentexpressionswithsubscript>>> ((a,b) :=3)File"<unknown>",line1    ((a,b) :=3)^^^^^^SyntaxError:cannotuseassignmentexpressionswithtuple

I am working on this right now :)

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp