Python is readable

alex23 wuwei23 at
Mon Mar 19 04:15:56 CET 2012

John Ladasky <lada... at> wrote:
> > The idea that Python code has to be obvious to non-programmers is an
> > incorrect and dangerous one.
> Incorrect?  Probably.  Dangerous?  You'll have to explain what you
> mean.

The classic "obvious" behaviour to new Python programmers that causes
problems would be mutable default arguments. At this point you have
two options: improve the "readability" to new users so their
expectations are met, or ask them to modify those expectations and
understand what's really happening under the surface. As it stands,
you tend to hit this problem pretty early on, learn about it, and walk
away with a deeper knowledge of Python's mechanics. The danger, I
feel, is that changing it to better fit the mind-set that non-Python
programmers bring with them could mask that necessary understanding
for longer.

More information about the Python-list mailing list