summaryrefslogtreecommitdiff
path: root/pyparsing/results.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2022-02-15 00:28:29 -0600
committerptmcg <ptmcg@austin.rr.com>2022-02-15 00:28:29 -0600
commit1812d239f23e1504ec6734f1e59086693ee42d7c (patch)
tree8c7fed0cd5970954ca3fe8a309acfd58935bc5a7 /pyparsing/results.py
parent2206f2b8442add926d2061b1abd0a5007e59953e (diff)
downloadpyparsing-git-1812d239f23e1504ec6734f1e59086693ee42d7c.tar.gz
Clean up dump() examples in docstrings
Diffstat (limited to 'pyparsing/results.py')
-rw-r--r--pyparsing/results.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/pyparsing/results.py b/pyparsing/results.py
index 9676f45..bb444df 100644
--- a/pyparsing/results.py
+++ b/pyparsing/results.py
@@ -65,9 +65,9 @@ class ParseResults:
'month' in result -> True
'minutes' in result -> False
result.dump() -> ['1999', '/', '12', '/', '31']
- - day: 31
- - month: 12
- - year: 1999
+ - day: '31'
+ - month: '12'
+ - year: '1999'
"""
_null_values: Tuple[Any, ...] = (None, [], "", ())
@@ -301,7 +301,7 @@ class ParseResults:
prints::
['AAB', '123', '321']
- - LABEL: AAB
+ - LABEL: 'AAB'
['AAB', '123', '321']
"""
@@ -603,15 +603,15 @@ class ParseResults:
integer = Word(nums)
date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
- result = date_str.parse_string('12/31/1999')
+ result = date_str.parse_string('1999/12/31')
print(result.dump())
prints::
- ['12', '/', '31', '/', '1999']
- - day: 1999
- - month: 31
- - year: 12
+ ['1999', '/', '12', '/', '31']
+ - day: '31'
+ - month: '12'
+ - year: '1999'
"""
out = []
NL = "\n"