Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.08; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'lawrence': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'url:faq': 0.09; 'win32': 0.12; '"copyright",': 0.16; '"credits"': 0.16; '"license"': 0.16; '"w")': 0.16; '2.7.2': 0.16; 'needed?': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'syntaxerror:': 0.16; 'cc:addr:python-list': 0.16; 'syntax': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'cc:no real name:2**0': 0.21; "aren't": 0.21; 'header :In-Reply-To:1': 0.22; 'btw,': 0.23; 'cc:2**0': 0.26; 'mainly': 0.28; 'invalid': 0.28; 'bit': 0.28; 'cc:addr:python.org': 0.29; 'tjg': 0.30; 'header:User-Agent:1': 0.33; 'file': 0.34; 'url:python': 0.35; 'but': 0.37; 'received:192': 0.38; 'url:org': 0.39; 'ok,': 0.39; 'type': 0.61; 'more': 0.61; 'talking': 0.62; 'from:addr:mail': 0.64; 'design.': 0.73; 'url:design': 0.84; 'to:none': 0.93 Date: Thu, 15 Mar 2012 14:28:38 +0000 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: Python is readable References: <4f612b19$0$1379$4fafbaef@reader2.news.tin.it> <8e72d74f-c844-4de3-8a37-f6b1fdc2291f@y27g2000yqy.googlegroups.com> <50e9ceec-40f1-4ead-b2b6-87328b30d084@ow8g2000pbc.googlegroups.com> <4f61c828$0$1390$4fafbaef@reader2.news.tin.it> <4f61d728$0$1375$4fafbaef@reader2.news.tin.it> <4f61fa8a$0$1381$4fafbaef@reader2.news.tin.it> In-Reply-To: <4f61fa8a$0$1381$4fafbaef@reader2.news.tin.it> 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.12 Precedence: list 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331821722 news.xs4all.nl 6922 [2001:888:2000:d::a6]:54822 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21674 On 15/03/2012 14:19, Kiuhnm wrote: > On 3/15/2012 15:06, Mark Lawrence wrote: >> On 15/03/2012 11:48, Kiuhnm wrote: >>> BTW, aren't those ':' redundant? >>> >>> Kiuhnm >> >> Nope. >> >> Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> with open("filename", "w") as f >> File "", line 1 >> with open("filename", "w") as f >> ^ >> SyntaxError: invalid syntax > > Ok, so they're mandatory, but I was mainly talking of design. Why are > they needed? > > Kiuhnm http://docs.python.org/faq/design.html#why-are-colons-required-for-the-if-while-def-class-statements TJG