You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Handle walrus operator
Or rather set precedence on call_stmt and expr_stmt Adjust pytest test_single_compile so it works now
This commit is contained in:
BIN
test/bytecode_3.8_run/02_named_expr.pyc
Normal file
BIN
test/bytecode_3.8_run/02_named_expr.pyc
Normal file
Binary file not shown.
14
test/simple_source/bug38/02_named_expr.py
Normal file
14
test/simple_source/bug38/02_named_expr.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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
|
Reference in New Issue
Block a user