Learning Python

I’m almost through Dive Into Python and came across this gem today:

I resisted list comprehensions when I first learned Python, and I resisted filter and map even longer. I insisted on making my life more difficult, sticking to the familiar way of for loops and if statements and step−by−step code−centric programming. And my Python programs looked a lot like Visual Basic programs, detailing every step of every operation in every function. And they had all the same types of little problems and obscure bugs. And it was all pointless.

Let it all go. Busywork code is not important. Data is important. And data is not difficult. It’s only data. If you have too much, filter it. If it’s not what you want, map it. Focus on the data; leave the busywork behind.

I definitely have the same inclinations and am glad he brings it up so directly.  In fact, the entire book has a refreshingly direct tone; I highly recommend it.

no comments to “Learning Python”...
post a comment to “Learning Python”...