Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Generates incorrect code if unparse passes an assignment with an empty tuple on the left side.
importastast.unparse(ast.parse("() = []"))# " = []"ast.unparse(ast.parse("[] = () = []"))# "[] = = []"
The simplest solution would be to remove the lineself.set_precedence(_Precedence.TUPLE, target)
in ast._Unparser.visit_Assign
Doesn't work properly in 3.11.0b1, 3.12.0a0
In 3.9.12, 3.10.4 - works correctly