diff options
Diffstat (limited to 'pyparsing/core.py')
-rw-r--r-- | pyparsing/core.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index e778272..9fbb6d0 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -1,7 +1,6 @@ # # core.py # -from __future__ import annotations from collections import deque import os @@ -4524,8 +4523,8 @@ class ParseElementEnhance(ParserElement): super().leave_whitespace(recursive) if recursive: - self.expr = self.expr.copy() if self.expr is not None: + self.expr = self.expr.copy() self.expr.leave_whitespace(recursive) return self @@ -4533,8 +4532,8 @@ class ParseElementEnhance(ParserElement): super().ignore_whitespace(recursive) if recursive: - self.expr = self.expr.copy() if self.expr is not None: + self.expr = self.expr.copy() self.expr.ignore_whitespace(recursive) return self |