Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'c++,': 0.07; 'ugly': 0.07; 'python': 0.09; 'brackets': 0.09; 'compilers.': 0.09; 'dumps': 0.09; '(c#,': 0.16; 'contributors': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'ignores': 0.16; 'long-time': 0.16; 'mark,': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'parentheses': 0.16; "someone's": 0.16; 'wrote:': 0.17; 'widely': 0.17; '>>>': 0.18; 'java': 0.21; 'required.': 0.22; 'programming': 0.23; 'for?': 0.23; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'language.': 0.27; 'newer': 0.27; 'surprised': 0.29; "i'm": 0.29; 'code': 0.31; 'could': 0.32; 'impression': 0.33; 'anyone': 0.33; 'to:addr:python-list': 0.33; 'languages': 0.33; 'community': 0.35; 'really': 0.36; 'but': 0.36; 'programmers': 0.36; 'visual': 0.36; "didn't": 0.36; 'bad': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'short': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'most': 0.61; 'first': 0.61; 'back': 0.62; 'email addr:gmail.com': 0.63; 'more': 0.63; 'here': 0.65; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'day': 0.73; 'reply-to:addr:python.org': 0.84; 'widespread': 0.91 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=XeZXOvF5 c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=_vX2mLoUpDQA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=I6uluiCgGVEA:10 a=pGLkceISAAAA:8 a=SdblHEP6XU2GphquEvQA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Sun, 24 Feb 2013 20:34:53 +0000 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Newbie References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> <61471a01-ee6e-4bc6-bd08-8696a31ec1eb@googlegroups.com> In-Reply-To: <61471a01-ee6e-4bc6-bd08-8696a31ec1eb@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361738087 news.xs4all.nl 6864 [2001:888:2000:d::a6]:45026 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39785 On 2013-02-24 19:40, piterrr.dolinski@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. > Some languages require parentheses, others don't. C does. C++, Java and C# are descended from, or influenced by, C. Algol didn't (doesn't?). Pascal, Modula-2, Oberon, Ada, and others don't. Parentheses are used where required, but not used where they're not required, in order to reduce visual clutter.