From 8612f1c152fa9c5c2c53496df273231914a073f4 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Fri, 4 Aug 2000 16:54:54 +0000 Subject: [PATCH] update my email address fix com_call_function to cope with trailing comma in "f(a, b,)" --- Lib/compiler/transformer.py | 5 ++++- Tools/compiler/compiler/transformer.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 81100a92fae..16d1d8ba4c6 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -11,7 +11,7 @@ # February 1997. # # Support for ast.Node subclasses written and other revisions by -# Jeremy Hylton (jeremy@cnri.reston.va.us) +# Jeremy Hylton (jeremy@beopen.com) # """Parse tree transformation module. @@ -1001,6 +1001,9 @@ class Transformer: args.append(result) else: i = i + 1 # No broken by star arg, so skip the last one we processed. + if i < len_nodelist and nodelist[i][0] == token.COMMA: + # need to accept an application that looks like "f(a, b,)" + i = i + 1 star_node = dstar_node = None while i < len_nodelist: tok = nodelist[i] diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index 81100a92fae..16d1d8ba4c6 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -11,7 +11,7 @@ # February 1997. # # Support for ast.Node subclasses written and other revisions by -# Jeremy Hylton (jeremy@cnri.reston.va.us) +# Jeremy Hylton (jeremy@beopen.com) # """Parse tree transformation module. @@ -1001,6 +1001,9 @@ class Transformer: args.append(result) else: i = i + 1 # No broken by star arg, so skip the last one we processed. + if i < len_nodelist and nodelist[i][0] == token.COMMA: + # need to accept an application that looks like "f(a, b,)" + i = i + 1 star_node = dstar_node = None while i < len_nodelist: tok = nodelist[i]