Showing posts with label idioms. Show all posts
Showing posts with label idioms. Show all posts

Thursday, June 24, 2010

Python Idioms, Idiomatic Python

Get to know more about Python Idioms.

Just some samples of nice python idioms:

result = 'ok' if x > 10 else 'not ok'
result = [ 3 * d.Count for d in data if d.Count > 4 ]

Here are some links which I found very interesting:
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
http://bayes.colorado.edu/PythonIdioms.html

I will find more links and add them to this post later on.