Solved by Versus in post #16 
              
              
                Thanks to @user_123454321 we have an answer. 
Indeed, __len__ doesn’t influence how an iterable is converted to a list or iterated over in for loops. In fact, you have to implement and IndexError which signals the end of the iteration. This is also described in the __getitem__ docs 
So, the correct …