diff options
author | Matt Carmody <33763384+mattcarmody@users.noreply.github.com> | 2020-03-29 20:14:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 15:14:56 -0500 |
commit | 96fe2688898c1846ea97e2039659b98ed6f71e4e (patch) | |
tree | 00dfca9a93defb22687ae2d2a44664347cdceed8 /pyparsing/helpers.py | |
parent | 963a6245194692440dc3396b254925738405531f (diff) | |
download | pyparsing-git-96fe2688898c1846ea97e2039659b98ed6f71e4e.tar.gz |
Docstring formatting changes (#197)
* Tidy docstring formatting for lists and example codeblock
* Add class references and formatting to docstrings
* Experimental docstring formatting changes
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index 5408885..a7ca83d 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -135,8 +135,8 @@ def matchPreviousExpr(expr): def oneOf(strs, caseless=False, useRegex=True, asKeyword=False): - """Helper to quickly define a set of alternative Literals, and makes - sure to do longest-first testing when there is a conflict, + """Helper to quickly define a set of alternative :class:`Literal`\ s, + and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. @@ -147,10 +147,10 @@ def oneOf(strs, caseless=False, useRegex=True, asKeyword=False): - caseless - (default= ``False``) - treat all literals as caseless - useRegex - (default= ``True``) - as an optimization, will - generate a Regex object; otherwise, will generate + generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - - asKeyword - (default= ``False``) - enforce Keyword-style matching on the + - asKeyword - (default= ``False``) - enforce :class:`Keyword`-style matching on the generated expressions Example:: |