Did you consider defining `__iter__`?