From 1bf5807fe4d03d9fa2bfded0861533745ea30ca4 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Thu, 10 Nov 2022 17:18:26 -0600 Subject: Additional measures to prevent premature streamlining (Issue #447) --- pyparsing/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyparsing/helpers.py') diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index c4ac2a9..4b2655f 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -58,9 +58,9 @@ def delimited_list( while to_visit and num_exprs < MAX_EXPRS: parent, cur = to_visit.pop() num_exprs += 1 - if cur in seen: + if id(cur) in seen: continue - seen.add(cur) + seen.add(id(cur)) cur = cur.copy() if parent is None: cpy = cur -- cgit v1.2.1