add dictionary-support to pipeline eq function
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Apr 2019 03:22:01 +0000 (04:22 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 4 Apr 2019 03:22:01 +0000 (04:22 +0100)
src/add/singlepipe.py

index 081a8a52f040226f55bca6cda44efa8118b40654..9dc0ee5eb56432a81fa41609f4bcedce923a69b3 100644 (file)
@@ -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):