From 450469c675297405f14d9cfdce4765430a0163ae Mon Sep 17 00:00:00 2001 From: isidentical Date: Sun, 15 Dec 2019 15:22:33 +0300 Subject: [PATCH 1/2] bpo-38870: Remove dead code related with argument unparsing --- Lib/ast.py | 7 ++----- .../next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst diff --git a/Lib/ast.py b/Lib/ast.py index 77eb24971ed24cb..13ae9e0a70eae0a 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -1199,11 +1199,8 @@ def visit_arguments(self, node): # keyword-only arguments if node.kwonlyargs: for a, d in zip(node.kwonlyargs, node.kw_defaults): - if first: - first = False - else: - self.write(", ") - self.traverse(a), + self.write(", ") + self.traverse(a) if d: self.write("=") self.traverse(d) diff --git a/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst b/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst new file mode 100644 index 000000000000000..db5919acd4bbbc0 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst @@ -0,0 +1 @@ +Remove dead code from ``ast._Unparser`` related with argument unparsing. From 49d402fda7efbcd033bbb94c90a355657f077b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= <47358913+isidentical@users.noreply.github.com> Date: Mon, 16 Dec 2019 08:03:52 +0300 Subject: [PATCH 2/2] remove news entry --- .../NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst diff --git a/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst b/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst deleted file mode 100644 index db5919acd4bbbc0..000000000000000 --- a/Misc/NEWS.d/next/Library/2019-12-15-15-22-04.bpo-38870.YHJpq5.rst +++ /dev/null @@ -1 +0,0 @@ -Remove dead code from ``ast._Unparser`` related with argument unparsing.