Hacker News new | past | comments | ask | show | jobs | submit login

I'm ambivalent about changing so many functions to return iterators. It's cleaner for experienced coders, but harder to understand for beginners.



Most of those changes get masked behind loops that I don't think either is very different for understanding.

I think the plusses outweigh the edge cases.


Having taught a couple beginners, I can tell you that what you see when you print a variable is very important. So, I guess it depends how these objects convert to strs, but I was assuming it would show a zip or map object rather than the result.


what are the edge cases? what are the advantages of iterators? less memoryuse?


Iterators get some of the benefits of lazy evaluation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: