Commit da0c82fe authored by Martin Bauer's avatar Martin Bauer
Browse files


parent be926709
......@@ -239,6 +239,11 @@ class Field:
def __getitem__(self, *idx):
return self.__call__(*idx)
def __iter__(self):
"""This is necessary to work with parts of sympy that test if an object is iterable (e.g. simplify).
The __getitem__ would make it iterable"""
raise TypeError("Field access is not iterable")
def field(self):
return self._field
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment