From 6f986aebe0d7fd3f9d30e507ec047e416b3eee08 Mon Sep 17 00:00:00 2001 From: "Brandon T. Willard" Date: Tue, 16 May 2023 23:56:41 -0500 Subject: [PATCH] Use reification input type to construct the output --- etuples/dispatch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etuples/dispatch.py b/etuples/dispatch.py index da94d62..5ee5d00 100644 --- a/etuples/dispatch.py +++ b/etuples/dispatch.py @@ -51,12 +51,12 @@ def _reify_ExpressionTuple(u, s): if getattr(u, "_parent", None) and all(res_same): # If we simply swapped-out logic variables, then we don't want to # lose the parent etuple information. - res = etuple(*res) + res = type(u)(res) res._parent = u._parent yield res return - yield etuple(*res) + yield type(u)(res) _reify.add((ExpressionTuple, Mapping), _reify_ExpressionTuple)