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

> Generators and comprehensions completely removed the need for those, yet the functions remain even in Python 3.

Hmm, I had never thought about it like that. Are there any articles, etc. you recommend about the differences or the advantages of one method over the other? It'd be nice to look into this more.




I don't think you'll find one. Guido wanted to remove them [1], but people wanted them to stay for some reason.

There is no difference between `map(func, values)` and `[func(x) for x in values]`, except for character count.

[1] http://www.artima.com/weblogs/viewpost.jsp?thread=98196




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

Search: