Skip to content

Walrus operator bug in the interpreter #113898

Closed as not planned
Closed as not planned
@R1senDev

Description

@R1senDev

Bug report

Bug description:

Python 3.11.4 (main, Sep 30 2023, 10:54:38) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x := 1
  File "<stdin>", line 1
    x := 1
      ^^
SyntaxError: invalid syntax
>>>

It doesn't seem right. It is logical to assume that the value (1 in my example) should be assigned to the variable (x) and output to the terminal, however, we see SyntaxError here.
If this is not really a problem, I apologize.

Thanks for your attention!

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions