Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bdr
on Dec 4, 2008
|
parent
|
context
|
favorite
| on:
Python 3.0 Released
I'm ambivalent about changing so many functions to return iterators. It's cleaner for experienced coders, but harder to understand for beginners.
dnaquin
on Dec 4, 2008
[–]
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.
bdr
on Dec 4, 2008
|
parent
|
next
[–]
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.
schtog
on Dec 5, 2008
|
parent
|
prev
[–]
what are the edge cases? what are the advantages of iterators? less memoryuse?
eru
on Dec 5, 2008
|
root
|
parent
[–]
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: