summaryrefslogtreecommitdiff
path: root/examples/parsePythonValue.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/parsePythonValue.py')
-rw-r--r--examples/parsePythonValue.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/parsePythonValue.py b/examples/parsePythonValue.py
index 53c61fc..351dad2 100644
--- a/examples/parsePythonValue.py
+++ b/examples/parsePythonValue.py
@@ -35,11 +35,11 @@ noneLiteral = Literal("None").setParseAction(replaceWith(None))
listItem = real|integer|quotedString|unicodeString|boolLiteral|noneLiteral| \
Group(listStr) | tupleStr | dictStr
-tupleStr << ( Suppress("(") + Optional(delimitedList(listItem)) +
+tupleStr << ( Suppress("(") + Optional(delimitedList(listItem)) +
Optional(Suppress(",")) + Suppress(")") )
tupleStr.setParseAction( cvtTuple )
-listStr << (lbrack + Optional(delimitedList(listItem) +
+listStr << (lbrack + Optional(delimitedList(listItem) +
Optional(Suppress(","))) + rbrack)
listStr.setParseAction(cvtList, lambda t: t[0])