aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mdpoly/expressions.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/mdpoly/expressions.py b/mdpoly/expressions.py
index 88baedf..71c94b2 100644
--- a/mdpoly/expressions.py
+++ b/mdpoly/expressions.py
@@ -59,10 +59,11 @@ class Expression:
def __str__(self):
return f"Expression{str(self.expr)}"
- def __getattr__(self, attr):
- # Behave transparently
- # TODO: replace with selected attributes to expose?
- return getattr(self.unwrap(), attr)
+ # TODO: is this actually a good idea? probably not.
+ # def __getattr__(self, attr):
+ # # Behave transparently
+ # # TODO: replace with selected attributes to expose?
+ # return getattr(self.unwrap(), attr)
# -- Monadic operations --
@@ -264,7 +265,7 @@ class Expression:
return rep, state
except Exception as e:
- bad = find_bad(self)
+ bad = find_bad(self.unwrap())
# for frame in bad._stack:
# print(bad, frame.function, frame.filename, frame.lineno)
@@ -285,7 +286,7 @@ class Expression:
clear_stack(expr.left)
clear_stack(expr.right)
- clear_stack(self.expr)
+ clear_stack(self.unwrap())
def to_sparse(self, state: State) -> tuple[SparseRepr, State]:
""" Make a sparse representation.