From d114261608f986b5c797eef4330fbe32041d3eb6 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 17 Oct 2001 13:32:52 +0000 Subject: [PATCH] Handle testlist_safe as if it were testlist. --- Lib/compiler/transformer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index c2a3b9648fb..88b3dac1bf3 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -515,9 +515,11 @@ def suite(self, nodelist): def testlist(self, nodelist): # testlist: expr (',' expr)* [','] + # testlist_safe: test [(',' test)+ [',']] # exprlist: expr (',' expr)* [','] return self.com_binary(Tuple, nodelist) + testlist_safe = testlist # XXX exprlist = testlist def test(self, nodelist): @@ -1254,6 +1256,7 @@ def get_docstring(self, node, n=None): _doc_nodes = [ symbol.expr_stmt, symbol.testlist, + symbol.testlist_safe, symbol.test, symbol.and_test, symbol.not_test, @@ -1306,6 +1309,7 @@ def get_docstring(self, node, n=None): symbol.try_stmt, symbol.suite, symbol.testlist, + symbol.testlist_safe, symbol.test, symbol.and_test, symbol.not_test,