Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9410

Re: An interesting beginner question: why we need colon at all in the python language?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'guido': 0.04; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:beginner': 0.09; 'subject:language': 0.09; 'url:faq': 0.09; 'subject:python': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'alex23': 0.16; 'indent': 0.16; 'reedy': 0.16; 'subject: \n ': 0.16; 'def': 0.16; 'jan': 0.19; 'subject:question': 0.21; 'wrote': 0.21; 'header:In-Reply-To:1': 0.22; 'indentation': 0.23; 'subject:need': 0.28; 'signals': 0.30; 'subject:?': 0.31; 'lines': 0.31; 'done': 0.33; 'to:addr:python-list': 0.34; 'header:X -Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'post': 0.34; 'url:python': 0.37; 'faq:': 0.37; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'url:docs': 0.39; 'to:addr:python.org': 0.39; 'header': 0.40; "i'd": 0.40; 'url:2011': 0.64; 'note:': 0.68; 'physical': 0.78; 'you:': 0.80; 'subject:interesting': 0.84; 'url:design': 0.84; 'occupy': 0.91; 'url:07': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: An interesting beginner question: why we need colon at all in the python language?
Date Wed, 13 Jul 2011 12:18:18 -0400
References <CAAyd8ckM7WqzTpXzVFFocEFQcm8oeHPQGAv1KH6BcBj6kqA2WA@mail.gmail.com> <mailman.889.1310393783.1164.python-list@python.org> <641c72bd-9321-4f34-b11c-2146a90fea22@28g2000pry.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-74-109-121-73.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11
In-Reply-To <641c72bd-9321-4f34-b11c-2146a90fea22@28g2000pry.googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.994.1310573910.1164.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310573910 news.xs4all.nl 23838 [2001:888:2000:d::a6]:47184
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9410

Show key headers only | View raw


On 7/13/2011 2:26 AM, alex23 wrote:
> Thomas Jollans<t...@jollybox.de>  wrote:
>> Coincidentally, Guido wrote this blog post just last week, without which
>> I'd be just as much at a loss as you:
>>
>> http://python-history.blogspot.com/2011/07/karin-dewar-indentation-an...
>
> It's also part of the Python FAQ:
>
> http://docs.python.org/faq/design.html#why-are-colons-required-for-the-if-while-def-class-statements

An added note: the header lines of compound statements do not 
necessarily occupy just one physical line. The : signals the end of the 
logical line. Editors can use to to indent intelligently. Consider

def myfunc(a,
            b,
            c):
     return a+b+c

All indentation was done automatically by IDLE's editor.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: An interesting beginner question: why we need colon at all in the python language? Thomas Jollans <t@jollybox.de> - 2011-07-11 16:16 +0200
  Re: An interesting beginner question: why we need colon at all in the python language? Grant Edwards <invalid@invalid.invalid> - 2011-07-11 14:43 +0000
  Re: An interesting beginner question: why we need colon at all in the python language? alex23 <wuwei23@gmail.com> - 2011-07-12 23:26 -0700
    Re: An interesting beginner question: why we need colon at all in the python language? Terry Reedy <tjreedy@udel.edu> - 2011-07-13 12:18 -0400
  Re: An interesting beginner question: why we need colon at all in   the python language? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-07-13 10:08 +0200
    Re: An interesting beginner question: why we need colon at all in   the python language? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-13 21:07 +1000
      Re: An interesting beginner question: why we need colon at all in   the python language? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-07-13 13:26 +0200
        Re: An interesting beginner question: why we need colon at all in the python language? Tim Chase <python.list@tim.thechases.com> - 2011-07-13 07:16 -0500
      Re: An interesting beginner question: why we need colon at all in the python language? Chris Angelico <rosuav@gmail.com> - 2011-07-13 21:58 +1000
      Re: An interesting beginner question: why we need colon at all in   the python language? Grant Edwards <invalid@invalid.invalid> - 2011-07-13 13:18 +0000
    Re: An interesting beginner question: why we need colon at all in   the python language? Grant Edwards <invalid@invalid.invalid> - 2011-07-13 13:03 +0000
      Re: An interesting beginner question: why we need colon at all in the python language? Chris Angelico <rosuav@gmail.com> - 2011-07-13 23:11 +1000
      Re: An interesting beginner question: why we need colon at all in     the python language? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-07-13 19:27 +0200
      Re: An interesting beginner question: why we need colon at all in the python language? Grant Edwards <invalid@invalid.invalid> - 2011-07-14 14:34 +0000
        Re: An interesting beginner question: why we need colon at all in the python language? Wanderer <wanderer@dialup4less.com> - 2011-07-14 08:14 -0700
          Re: An interesting beginner question: why we need colon at all in the python language? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-16 14:07 +1000

csiph-web