From fa741190622e2149e1dfd6c9e2565d87fcd484a6 Mon Sep 17 00:00:00 2001 From: Paul McGuire Date: Sat, 30 Mar 2019 02:58:29 -0500 Subject: Convert docstrings containing regex examples to raw string literals, to avoid Py3.8 SyntaxWarnings (#80) --- pyparsing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyparsing.py') diff --git a/pyparsing.py b/pyparsing.py index af88035..f748087 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -94,7 +94,7 @@ classes inherit from. Use the docstrings for examples of how to: """ __version__ = "2.4.0" -__versionTime__ = "30 Mar 2019 05:34 UTC" +__versionTime__ = "30 Mar 2019 07:57 UTC" __author__ = "Paul McGuire " import string @@ -3081,7 +3081,7 @@ class Regex(Token): return self.strRepr def sub(self, repl): - """ + r""" Return Regex with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. @@ -3441,7 +3441,7 @@ class GoToColumn(_PositionToken): class LineStart(_PositionToken): - """Matches if current position is at the beginning of a line within + r"""Matches if current position is at the beginning of a line within the parse string Example:: -- cgit v1.2.1