Skip to content

Iterator pattern __iter__ function #4

@jacobgil

Description

@jacobgil

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions