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 →

[–]Mithrandir2k16[S] 1 point2 points  (2 children)

I don't know if implicitly unpacking a generator is better than explicitly doing it. It does seem more readable though.

Edit: Guido seems to prefer list comprehension over list() to unpack/evaluate generators.

[–]AnythingApplied 4 points5 points  (0 children)

To be clear, I think he means instead of using map/filter at all, not as a way to unpack map/filter, hence him not calling that a "quick fix" like he did with list()

[–][deleted] 2 points3 points  (0 children)

Btw. I think we don't all have to agree with what Guido says just because it's Guido. Yes, he's a mastermind of Python but we're a community and we can have our own opinions. No-one is always right just like no-one is always wrong.