>>> class blah(object):
... def __init__(self, idk):
... self.idk = idk
...
... def __list__(self):
... return self.idk
...
>>> bla = blah([1, 2, 3, 4, 5])
>>> bla
<__main__.blah object at 0x78eb67a69ac8>
>>> list(bla)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'blah' object is not iterable
>>> blah.__iter__ = lambda self: (i for i in self.idk)
>>> list(bla)
[1, 2, 3, 4, 5]