Skip to content

Commit

Permalink
compiler: Make Bunch iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Sep 4, 2023
1 parent dcab62b commit 9a7aa6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devito/tools/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def __init__(self, **kwargs):
def __repr__(self):
return "Bunch(%s)" % ", ".join(["%s=%s" % i for i in self.__dict__.items()])

def __iter__(self):
for i in self.__dict__.values():
yield i


class EnrichedTuple(tuple, Pickable):

Expand Down

0 comments on commit 9a7aa6f

Please sign in to comment.