ml-design-patterns icon indicating copy to clipboard operation
ml-design-patterns copied to clipboard

Iterator pattern __iter__ function

Open jacobgil opened this issue 3 years ago • 0 comments

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 !

jacobgil avatar Aug 05 '22 18:08 jacobgil