3 ms·
If you work with other languages in addition to Python, it's easy to fall back into old habits. You should internalize the content from these two excellent pres
by ingve 13y ago
If you work with other languages in addition to Python, it's easy to fall back into old habits. You should internalize the content from these two excellent presentations:
Raymond Hettinger's "Transforming Code into Beautiful, Idiomatic Python":
http://pyvideo.org/video/1780/transforming-code-into-beautiful-idiomatic-pytho http://pyvideo.org/video/1780/transforming-code-into-beautif...
(pyvideo.org has a lot of other great talks and presentations.)
Ned Batchelder's "Loop Like A Native":
http://nedbatchelder.com/text/iter.html http://nedbatchelder.com/text/iter.html
Python Module of the Week is also an excellent resource:
http://pymotw.com/2/ http://pymotw.com/2/
- jeffasinger 13y agoWatching the video was worth it for realizing when you'd want the second argument of iter()