From 07d82bb767d75a0a30bd6f806938c1f9fe50d8ee Mon Sep 17 00:00:00 2001 From: Paul McGuire Date: Sat, 20 Jul 2019 13:44:16 -0500 Subject: Fix latent bug if adding a parse action after having cleared parse actions with None --- pyparsing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyparsing.py') diff --git a/pyparsing.py b/pyparsing.py index 0bdd8db..af0cff0 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -96,7 +96,7 @@ classes inherit from. Use the docstrings for examples of how to: """ __version__ = "2.4.1" -__versionTime__ = "16 Jul 2019 04:10 UTC" +__versionTime__ = "20 Jul 2019 18:17 UTC" __author__ = "Paul McGuire " import string @@ -1542,7 +1542,7 @@ class ParserElement(object): date_str.parseString("1999/12/31") # -> [1999, '/', 12, '/', 31] """ if list(fns) == [None,]: - self.parseAction = None + self.parseAction = [] else: if not all(callable(fn) for fn in fns): raise TypeError("parse actions must be callable") -- cgit v1.2.1