What Python looks like

Brett Ritter swiftone at swiftone.org
Tue Aug 5 11:08:09 EDT 2008


On Aug 4, 3:43 pm, Gary Herron <gher... at islandtraining.com> wrote:
> A page of Python code looks *clean*,  with not a lot of
> punctuation/special symbols and (in particular) no useless lines

I am actually going to buck the trend.

My first impression of Python was that it was visually hard to parse.

When seeing sample code from languages I don't know (.NET, Smalltalk,
etc) I can decipher the intent fairly easily (on simple code).
Python, on the other hand, used shorthand notation for everything.
Each word wasn't bad, but as a whole it tended to wash out informative
clues.  The lack of "special symbols" likewise removed visual parsing
clues.

Put another way, imagine math went from:
2 + 2 = 4
to:
two plus two equals four
and then someone decided to abbreviate:
two pl two eq four

When I ran into list comprehensions (Aah!  Now we have punctuation,
but it's not providing visual parsing clues, it's more like Lisp
parens!) or lambda definitions or "self" being added a lot, it grew
more dense.

This is NOT a rip on Python.  Please put the flamethrowers away.  I
appreciate that Python operates with a fairly dense use of information
and operations.  (Believe me, having done enough Java, I can
appreciate not having excessive syntax).  My point is that not
everyone new to Python is going to have a "clean and clear" first
impression, particularly based on their previous language experience.



More information about the Python-list mailing list