From de8326d00dffdb500c02839a98330b869c2457f3 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 22 Dec 2018 09:28:48 -0800 Subject: Trim trailing white space throughout the project Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines. --- examples/parsePythonValue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/parsePythonValue.py') 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]) -- cgit v1.2.1