Skip to content

Commit 52ed224

Browse files
committed
Update docs with PEP8 names
1 parent 274ed98 commit 52ed224

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎README.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Here is a program to parse ``"Hello, World!"`` (or any greeting of the form
2626
from pyparsing import Word, alphas
2727
greet = Word(alphas) + "," + Word(alphas) + "!"
2828
hello = "Hello, World!"
29-
print(hello, "->", greet.parseString(hello))
29+
print(hello, "->", greet.parse_string(hello))
3030
3131
The program outputs the following::
3232

@@ -36,7 +36,7 @@ The Python representation of the grammar is quite readable, owing to the
3636
self-explanatory class names, and the use of '+', '|' and '^' operator
3737
definitions.
3838
39-
The parsed results returned from ``parseString()`` is a collection of type
39+
The parsed results returned from ``parse_string()`` is a collection of type
4040
``ParseResults``, which can be accessed as a
4141
nested list, a dictionary, or an object with named attributes.
4242

‎docs/HowToUsePyparsing.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ Exception classes and Troubleshooting
998998

999999
expr = pp.Word(pp.alphanums).set_name("word").set_debug()
10001000
print(ppt.with_line_numbers(data))
1001-
expr[...].parseString(data)
1001+
expr[...].parse_string(data)
10021002

10031003
prints::
10041004

@@ -1155,7 +1155,7 @@ Helper methods
11551155

11561156
expr = infix_notation(int_expr,
11571157
[
1158-
(one_of("+ -"), 2, opAssoc.LEFT),
1158+
(one_of("+ -"), 2, OpAssoc.LEFT),
11591159
],
11601160
lpar="<",
11611161
rpar=">"
@@ -1170,7 +1170,7 @@ Helper methods
11701170

11711171
expr = infix_notation(int_expr,
11721172
[
1173-
(one_of("+ -"), 2, opAssoc.LEFT),
1173+
(one_of("+ -"), 2, OpAssoc.LEFT),
11741174
],
11751175
lpar=Literal("<"),
11761176
rpar=Literal(">")

0 commit comments

Comments
 (0)