Help understanding the decisions *behind* python?

sturlamolden sturlamolden at yahoo.no
Sat Aug 1 22:19:43 EDT 2009


On 31 Jul, 23:43, Raymond Hettinger <pyt... at rcn.com> wrote:

> More than one person here has
> observed that the time to learn to program Pythonically is inversely
> proportional to their experience in Java.

I believe it is opposite. The longer the Java experience, the longer
it takes to program pythonically. The correlation is not inverse. In
particular, programmers accustomed to Java or C++ seem to use for-
loops awfully lot. And when they do, they always loop over a sequence
of integers, and use these as array indices. They consequently use a
class where a tuple would be more appropriate, never return multiple
values from functions, etc. Due to their coding style, they produce
programs that are notoriously inefficient, and blame this on 'Python
being slow'. Unlearning the idioms from Java takes a while. Python is
not Java and should not be programmed as such.

On the other hand, I found that my experience with MATLAB helped me a
lot on picking up a pythonical style quickly.






More information about the Python-list mailing list