From 7d24910b3c1745867762614b99809ba8d2cba2a0 Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 8 Jan 2020 12:02:34 -0500 Subject: [PATCH] "with .. as" with tuples need parens in 3.0 so always add (). --- uncompyle6/semantics/customize3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uncompyle6/semantics/customize3.py b/uncompyle6/semantics/customize3.py index 22cbb7a8..36293392 100644 --- a/uncompyle6/semantics/customize3.py +++ b/uncompyle6/semantics/customize3.py @@ -53,7 +53,7 @@ def customize_for_version3(self, version): "raise_stmt2": ("%|raise %c from %c\n", 0, 1), "store_locals": ("%|# inspect.currentframe().f_locals = __locals__\n",), "withstmt": ("%|with %c:\n%+%c%-", 0, 3), - "withasstmt": ("%|with %c as %c:\n%+%c%-", 0, 2, 3), + "withasstmt": ("%|with %c as (%c):\n%+%c%-", 0, 2, 3), } )