From c50c84bac138f176259cf745e628000fd8539330 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Fri, 28 Dec 2018 14:55:39 -0600 Subject: Fix matching of dictOf with empty contents (Issue #53) --- pyparsing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyparsing.py') diff --git a/pyparsing.py b/pyparsing.py index 48e5e23..975846c 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -94,7 +94,7 @@ classes inherit from. Use the docstrings for examples of how to: """ __version__ = "2.3.1" -__versionTime__ = "28 Dec 2018 20:39 UTC" +__versionTime__ = "28 Dec 2018 20:52 UTC" __author__ = "Paul McGuire " import string @@ -5076,7 +5076,7 @@ def dictOf( key, value ): SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} """ - return Dict( ZeroOrMore( Group ( key + value ) ) ) + return Dict(OneOrMore(Group(key + value))) def originalTextFor(expr, asString=True): """Helper to return the original, untokenized text for a given -- cgit v1.2.1