From d62310f799ff7550ec98b1fb08f732b87746fbe7 Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 3 May 2022 12:19:43 -0400 Subject: [PATCH] Correct 3.6ish dictionary literals printing --- test/bytecode_3.6_run/05_long_literals.pyc | Bin 15723 -> 15723 bytes uncompyle6/semantics/n_actions.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bytecode_3.6_run/05_long_literals.pyc b/test/bytecode_3.6_run/05_long_literals.pyc index e73e3a0f4426315e51741977f063c686bec74413..201a1c68b39e354599d69a504a83bd75a4593286 100644 GIT binary patch delta 16 XcmaD|^}34Pn3tDJmLYc|dx|XpGl&HY delta 16 XcmaD|^}34Pn3tDpc2C+y_7qzHIv)lP diff --git a/uncompyle6/semantics/n_actions.py b/uncompyle6/semantics/n_actions.py index 8d655afc..32626822 100644 --- a/uncompyle6/semantics/n_actions.py +++ b/uncompyle6/semantics/n_actions.py @@ -242,13 +242,13 @@ class NonterminalActions: self.line_number = elem.linestart else: if sep != "": - sep += " " + sep += ", " elif line_len > 80: next_indent = self.indent + INDENT_PER_LEVEL[:-1] line_len = len(next_indent) sep += "\n" + next_indent - sep_key_value = f" {repr(keys[i])}: {value}" + sep_key_value = f"{sep}{repr(keys[i])}: {value}" line_len += len(sep_key_value) self.write(sep_key_value) sep = ", "