Python Newbie

Mitya Sirenef msirenef at lightbird.net
Sun Feb 24 21:06:37 CET 2013


On 02/24/2013 02:40 PM, piterrr.dolinski at gmail.com wrote:
>>> if (some statement): #  short form
 >>>
 >>> rather than
 >>>
 >>> if (some statement == true): # long form
 >>
 >>
 >> What all those ugly brackets are for?
 >>
 >
 > Mark,
 >
 > Back in the day when C was king, or take many newer long established
 > languages (C#, Java), the use of () has been widespread and mandated
 > by the compilers. I have never heard anyone moan about the requirement
 > to use parentheses. Now come Python in which parens are optional, and
 > all of a sudden they are considered bad and apparently widely
 > abandoned. Do you really not see that code with parens is much more
 > pleasing visually? I could understand someone's reluctance to use
 > parens if they are very new to programming and Pythons is their first
 > language. But my impression here is that most group contributors are
 > long-time programmers and have long used () where they are required.
 > Again, I'm really surprised the community as a whole ignores the
 > programming "heritage" and dumps the parens in a heartbeat.
 >
 > Peter


When I write in English, I write: If it rains, I'll get an umbrella.
I do not write: If (it rains), I'll get an umbrella. The second example
isn't any clearer. The only reason you like unneeded parens is that
you're used to them. I've never heard of anyone missing this "feature"
after a month or two of using Python.

  -m


-- 
Lark's Tongue Guide to Python: http://lightbird.net/larks/

The world is a perpetual caricature of itself; at every moment it is the
mockery and the contradiction of what it is pretending to be.
George Santayana




More information about the Python-list mailing list