Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator pattern __iter__ function #4

Open
jacobgil opened this issue Aug 5, 2022 · 0 comments
Open

Iterator pattern __iter__ function #4

jacobgil opened this issue Aug 5, 2022 · 0 comments

Comments

@jacobgil
Copy link

jacobgil commented Aug 5, 2022

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant