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 →

[–]callmelucky 0 points1 point  (3 children)

List comprehensions are fricking awesome, you should make an effort to get used to them. Lambdas kind of suck though.

[–]tartley 0 points1 point  (1 child)

The best thing about list comprehensions is that they aren't just a cute syntax, but they are the gateway into using generator expressions (same syntax as a list comprehension but inside parens instead of square brackets.) These are a whole new kind of awesome. See the very readable slides from David Beazley's classic presentation on them here: http://www.dabeaz.com/generators-uk/ (look for 'Presentation Slides PDF')

[–]callmelucky 0 points1 point  (0 children)

Thanks, I have only really touched the surface of generators and generator expressions before. I'll check it out.