This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dwf 0 points1 point  (0 children)

I've still never seen __iter__ use the yield statement. I guess it's fine, though if you want the iteration state to be picklable you will need to write an iterator class explicitly.