From 98f101092074ae15ab7f1e579c6bde04c4eec278 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Tue, 28 Feb 2017 04:40:51 +0000 Subject: Minor change when using '-' operator, to be compatible with ParserElement.streamline() method. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@454 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b --- src/pyparsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyparsing.py b/src/pyparsing.py index 576ddf6..8a02b63 100644 --- a/src/pyparsing.py +++ b/src/pyparsing.py @@ -1834,7 +1834,7 @@ class ParserElement(object): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) return None - return And( [ self, And._ErrorStop(), other ] ) + return self + And._ErrorStop() + other def __rsub__(self, other ): """ -- cgit v1.2.1