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

gh-146260: Improve syntax error for assignment expression inside conditional expression#146305

Open
brianschubert wants to merge 1 commit intopython:mainfrom
brianschubert:gh-146260-syntax-err-walrus-in-ternary
Open

gh-146260: Improve syntax error for assignment expression inside conditional expression#146305
brianschubert wants to merge 1 commit intopython:mainfrom
brianschubert:gh-146260-syntax-err-walrus-in-ternary

Conversation

@brianschubert
Copy link
Contributor

@brianschubertbrianschubert commentedMar 22, 2026
edited by bedevere-appbot
Loading

Demo:

>>> (...1...ifx:=True...else2... )...File"<python-input-0>",line3ifx:=True^^^^^^^^^SyntaxError:assignmentexpressionmustbeparenthesizedinsideconditionalexpression>>> (...1...if (x:=True)...else2... )1

@brianschubert
Copy link
ContributorAuthor

See Guido's comment in the issue about relaxing the syntax instead:#146260 (comment)

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

Reviewers

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@brianschubert

[8]ページ先頭

©2009-2026 Movatter.jp