Monday, July 09, 2007

Python Syntax Goodness

List comprehensions in Python are awesome. I saw one for the first time, knew exactly what it did, and started using them immediately. Yay for Python! Boo for me not being on top of these things like I should be. (PHP, I shake my fist at you)

4 comments:

Richard Edward Horner said...

Did they not teach you LISP or SCheme in college?

Linden said...

Ah, surely you jest. I think the choices in college these days are C++ and Java, choose one. I did do a Lisp interpreter (in C++) for one project, once, but it was quite simple.

I've found that if you want to learn anything outside that, you have to do it on your own. Not that I have a problem with that :)

Anonymous said...

List comprehension is tasty goodness. Now if I could just get comfortable with Lambda...

Linden said...

Bruce at the PUG can explain lambda in detail to you. I tend to use it only as a last resort.

This is a page on it from a book that I find to be very clear and well written.