From c80ad032186745b44d12b91fd603359fea315665 Mon Sep 17 00:00:00 2001 From: David Loscutoff Date: Tue, 16 Nov 2021 10:48:05 -0600 Subject: [PATCH] Fixed Issue #41. --- execution.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/execution.py b/execution.py index 5c97db9..0b5d780 100644 --- a/execution.py +++ b/execution.py @@ -216,8 +216,8 @@ def evaluate(self, expression): result = opFunction(*args) except TypeError as e: # Probably the wrong number of args - errMsg = f"evaluate({expression}) raised TypeError" - self.err.die("Implementation error:", errMsg, e) + self.err.die(f"Implementation error: evaluate({expression}) " + "raised TypeError:", e) #!print(fnName, "returned", result) return result @@ -819,7 +819,9 @@ def AT(self, lhs, rhs=None): result.append(groups[0]) return List(result) elif isinstance(rhs, Pattern) and isinstance(lhs, (List, Range)): - return List(self.AT(sub, rhs) for sub in lhs) + return List(self.AT(item, rhs) for item in lhs) + elif isinstance(rhs, List) and isinstance(lhs, PipIterable): + return List(self.AT(lhs, item) for item in rhs) elif isinstance(lhs, PipIterable): try: if len(lhs) == 0: