Walrus Operator := is causing incompatibility with all Python versions < 3.8.x #182

Closed
opened 2025-10-14 16:51:50 -06:00 by navan · 0 comments
Owner

Originally created by @OttomanZ on 6/28/2022

Describe the bug
Walrus Operator := is causing incompatibility with all Python versions < 3.8.x

To Reproduce
Steps to reproduce the behavior:

  1. Go to Line ' File "C:\Users\munee\GHunt\lib\modwall.py", line 29'
  2. Click on ':= and replace using actual line for variable, fancy code should not jeopardize compatibility'
  3. See error

Expected behavior
Should work just fine, and not produce the SyntaxError

Should work just fine as all dependencies are satisfied.

Screenshots
If applicable, add screenshots to help explain your problem.

    if req["specs"] and (specs := req["specs"][0]):
                               ^
SyntaxError: invalid syntax

System (please complete the following information):

  • OS Windows 10 201H2
  • Python version 3.7.7

Additional context
Add any other context about the problem here.

*Originally created by @OttomanZ on 6/28/2022* **Describe the bug** Walrus Operator `:=` is causing incompatibility with all Python versions < 3.8.x **To Reproduce** Steps to reproduce the behavior: 1. Go to Line ' File "C:\Users\munee\GHunt\lib\modwall.py", line 29' 2. Click on ':= and replace using actual line for variable, fancy code should not jeopardize compatibility' 4. See error **Expected behavior** Should work just fine, and not produce the `SyntaxError` ``` Should work just fine as all dependencies are satisfied. ``` **Screenshots** If applicable, add screenshots to help explain your problem. ```bash if req["specs"] and (specs := req["specs"][0]): ^ SyntaxError: invalid syntax ``` **System (please complete the following information):** - OS Windows 10 201H2 - Python version 3.7.7 **Additional context** Add any other context about the problem here.
Sign in to join this conversation.
No labels
backdoor-try
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
can't read
can't read
can't read
can't read
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
good first issue
google-patch
google-patch
hacktoberfest-accepted
hacktoberfest-accepted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
knowledge-enrichment
known bug
question
question
question
question
question
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
stale
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
third party bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/GHunt#182
No description provided.