summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/transformer.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-10-17 13:32:52 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-10-17 13:32:52 (GMT)
commitd114261608f986b5c797eef4330fbe32041d3eb6 (patch)
tree5b704954e5043689f54f1ed2dcfd1a4302ceebc2 /Lib/compiler/transformer.py
parent771f9146d5c29f8c059ebaad42ce49472ed48e0c (diff)
downloadcpython-d114261608f986b5c797eef4330fbe32041d3eb6.zip
cpython-d114261608f986b5c797eef4330fbe32041d3eb6.tar.gz
cpython-d114261608f986b5c797eef4330fbe32041d3eb6.tar.bz2
Handle testlist_safe as if it were testlist.
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r--Lib/compiler/transformer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index c2a3b96..88b3dac 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -515,9 +515,11 @@ class Transformer:
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 @@ class Transformer:
_doc_nodes = [
symbol.expr_stmt,
symbol.testlist,
+ symbol.testlist_safe,
symbol.test,
symbol.and_test,
symbol.not_test,
@@ -1306,6 +1309,7 @@ _legal_node_types = [
symbol.try_stmt,
symbol.suite,
symbol.testlist,
+ symbol.testlist_safe,
symbol.test,
symbol.and_test,
symbol.not_test,