ml-design-patterns
ml-design-patterns copied to clipboard
Iterator pattern __iter__ function
Hi Mark, Thanks for this, great work.
Is there a chance the iter function in the iterator function example, should return self instead of self.data[0] ? I thought that iter is called at the start of the iteration and needs to return an object that then implements next.
Thanks !