Skip to content

Commit

Permalink
Fix: MutableArray does not have an __iter__ method.
Browse files Browse the repository at this point in the history
  • Loading branch information
joodicator committed Jun 8, 2019
1 parent 290f1dc commit a309b75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minecraft/networking/types/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def __hash__(self):
values = tuple(getattr(self, a, None) for a in self._all_slots())
return hash((type(self), values))

def __iter__(self):
return iter(getattr(self, a) for a in self._all_slots())

@classmethod
def _all_slots(cls):
return tuple(f for c in reversed(cls.__mro__)
Expand Down

0 comments on commit a309b75

Please sign in to comment.