Python rocks

George Sakkis george.sakkis at gmail.com
Sat Jun 2 14:03:52 EDT 2007


On Jun 2, 12:31 pm, Steve Howell <showel... at yahoo.com> wrote:
> --- Mark Carter <m... at privacy.net> wrote:
>
> > Well, I know I'm preaching to the converted - but
> > Python rocks.
> > [...]
>
> A few questions from the choir:
>
> As a recent newcomer to the language, did you
> encounter any traps or pitfalls while you were
> learning?

I had probably stumbled on many/most of the common pitfalls usually
mentioned (e.g. http://www.ferg.org/projects/python_gotchas.html,
http://zephyrfalcon.org/labs/python_pitfalls.html) while learning, but
picked them up easily after the first or second time. Off the top of
my head, two errors that keep coming back even years after are:
- Comparing instances of (semantically) incomparable types (http://
www.ibm.com/developerworks/library/l-python-elegance-1.html).
Thankfully this will be fixed in Py3k.
- Strings being iterable; unfortunately this will stay in Py3K.

> Also, could you single out anything in
> particular about Python that started making you more
> productive, or was it just the overall design?

If I were to pick a single feature, this would be the triplet
iterators-generators-itertools, not only for the productivity gains
but perhaps even more for changing the way of thinking about
programming, making Python worth learning [1]. But in general it's the
overall design, making the right tradeoffs in most cases.

George


[1] "A language that doesn't affect the way you think about
programming, is not worth knowing." - Alan Perlis




More information about the Python-list mailing list