From 161f4f8f9ec75f62d3e7bd8a528de9c2b7785e34 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 4 Apr 2019 04:22:01 +0100 Subject: [PATCH] add dictionary-support to pipeline eq function --- src/add/singlepipe.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index 081a8a52..9dc0ee5e 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -247,9 +247,15 @@ def eq(o, i): python object, enumerate them, find out the list of Signals that way, and assign them. """ + res = [] + if isinstance(o, dict): + for (k, v) in o.items(): + print ("d-eq", v, i[k]) + res.append(v.eq(i[k])) + return res + if not isinstance(o, Sequence): o, i = [o], [i] - res = [] for (ao, ai) in zip(o, i): print ("eq", ao, ai) if isinstance(ao, Record): -- 2.30.2