diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2022-07-09 06:43:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 06:43:12 -0500 |
commit | 4432953173e8ba51ddcc4cf4ac9ead69c19d72d1 (patch) | |
tree | d271482f3bd8d9ef42b19039bf5348b68996ca4f | |
parent | 05b3aad6bccdb4d82147077c1b530b09455d8ab8 (diff) | |
download | pyparsing-git-4432953173e8ba51ddcc4cf4ac9ead69c19d72d1.tar.gz |
Small docstring formatting/syntax fixes (#426)
``...`` needs to be surrounded by non-word characters to be detected,
and backslash-space in a non-raw Python string should technically be
written backslash-backslash-space.
-rw-r--r-- | pyparsing/core.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index 54846f5..6b217a0 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -1084,7 +1084,7 @@ class ParserElement(ABC): an object with attributes if the given parser includes results names. If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This - is also equivalent to ending the grammar with :class:`StringEnd`\ (). + is also equivalent to ending the grammar with :class:`StringEnd`\\ (). To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string @@ -1348,7 +1348,7 @@ class ParserElement(ABC): def __add__(self, other) -> "ParserElement": """ Implementation of ``+`` operator - returns :class:`And`. Adding strings to a :class:`ParserElement` - converts them to :class:`Literal`\ s by default. + converts them to :class:`Literal`\\ s by default. Example:: @@ -1585,8 +1585,8 @@ class ParserElement(ABC): ``None`` may be used in place of ``...``. - Note that ``expr[..., n]`` and ``expr[m, n]``do not raise an exception - if more than ``n`` ``expr``s exist in the input stream. If this behavior is + Note that ``expr[..., n]`` and ``expr[m, n]`` do not raise an exception + if more than ``n`` ``expr``\\ s exist in the input stream. If this behavior is desired, then write ``expr[..., n] + ~expr``. For repetition with a stop_on expression, use slice notation: |