From 2607db674fdae311bee2aaae5e15ce0fdaeb9302 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Thu, 25 Jun 2020 21:21:38 -0500 Subject: More thorough ParseException.explain testing --- pyparsing/exceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyparsing/exceptions.py') diff --git a/pyparsing/exceptions.py b/pyparsing/exceptions.py index 2a10180..d92212d 100644 --- a/pyparsing/exceptions.py +++ b/pyparsing/exceptions.py @@ -63,9 +63,9 @@ class ParseBaseException(Exception): if isinstance(f_self, ParserElement): if frm.f_code.co_name not in ("parseImpl", "_parseNoCache"): continue - if f_self in seen: + if id(f_self) in seen: continue - seen.add(f_self) + seen.add(id(f_self)) self_type = type(f_self) ret.append( -- cgit v1.2.1