Files
python-uncompyle6/test/simple_source/bug38/02_named_expr.py
rocky a1fe069c8c Handle walrus operator
Or rather set precedence on call_stmt and expr_stmt

Adjust pytest test_single_compile so it works now
2022-04-12 05:21:13 -04:00

15 lines
293 B
Python

# From 3.8 test_named_expressions.py
# Bug was not putting parenthesis around := below
# RUNNABLE!
"""This program is self-checking!"""
(a := 10)
assert a == 10
# Bug was not putting all of the levels of parentheses := below
(z := (y := (x := 0)))
assert x == 0
assert y == 0
assert z == 0