aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mdpoly/abc.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/mdpoly/abc.py b/mdpoly/abc.py
index c291fdc..6ec1712 100644
--- a/mdpoly/abc.py
+++ b/mdpoly/abc.py
@@ -14,18 +14,7 @@ class Leaf(Protocol):
name: str
shape: Shape
- def children(self) -> tuple:
- """ Return an empty tuple. This is here to simplify recursive code on
- expressions. """
- return tuple()
- def __iter__(self):
- """ Return an empty iterator. This is here to simplify recursive code
- on expressions. """
- yield from iter(self.children())
-
-
-@runtime_checkable
class Expr(Protocol):
""" Binary tree to represent a mathematical expression. """
left: Self | Leaf
@@ -105,7 +94,6 @@ class Expr(Protocol):
yield from self.children()
-@runtime_checkable
class Rel(Protocol):
""" Relation between two expressions. """
lhs: Expr