summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2015-11-25 15:07:45 +0000
committerptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2015-11-25 15:07:45 +0000
commitf41bfe97655123599dfe46fc4238cb5d5be78f5d (patch)
tree77f97157bc160e2b783adcb56cd7f1660ee8f1b2
parent6f38e6ab2aa57a7d1a9ed8dc8d8e39a1f06b4810 (diff)
downloadpyparsing-f41bfe97655123599dfe46fc4238cb5d5be78f5d.tar.gz
Simplified string representation of Forward, to avoid memory and performance issues during streamlining
git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@302 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
-rw-r--r--src/CHANGES6
-rw-r--r--src/pyparsing.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/CHANGES b/src/CHANGES
index 2536be0..6fd73dd 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -2,6 +2,12 @@
Change Log
==========
+Version 2.0.7 -
+---------------------------
+- Simplified string representation of Forward class, to avoid memory
+ and performance errors while building ParseException messages.
+
+
Version 2.0.6 -
---------------------------
- Fixed a bug in Each when multiple Optional elements are present.
diff --git a/src/pyparsing.py b/src/pyparsing.py
index 3e02dbe..186bc45 100644
--- a/src/pyparsing.py
+++ b/src/pyparsing.py
@@ -57,8 +57,8 @@ The pyparsing module handles some of the problems that are typically vexing when
- embedded comments
"""
-__version__ = "2.0.6"
-__versionTime__ = "9 Nov 2015 19:03"
+__version__ = "2.0.7"
+__versionTime__ = "25 Nov 2015 09:02"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -2998,7 +2998,9 @@ class Forward(ParseElementEnhance):
def __str__( self ):
if hasattr(self,"name"):
return self.name
+ return self.__class__.__name__ + ": ..."
+ # stubbed out for now - creates awful memory and perf issues
self._revertClass = self.__class__
self.__class__ = _ForwardNoRecurse
try: