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


Groups > comp.lang.python > #9385

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!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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; 'defines': 0.07; 'inserts': 0.07; 'indicates': 0.09; 'pointer.': 0.09; 'subject:beginner': 0.09; 'subject:language': 0.09; 'wed,': 0.12; 'subject:python': 0.12; 'wrote:': 0.15; 'comma': 0.16; 'context;': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hangs': 0.16; 'subject: \n ': 0.16; 'surprising,': 0.16; 'pm,': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'insert': 0.19; 'subject:question': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'assumes': 0.23; 'subject:need': 0.28; 'message-id:@mail.gmail.com': 0.28; "didn't": 0.29; 'originally': 0.29; 'brain': 0.30; 'colon': 0.30; 'subject:?': 0.31; 'connected': 0.32; 'chris': 0.32; 'to:addr :python-list': 0.34; 'someone': 0.34; 'that,': 0.35; 'connection': 0.36; 'before.': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'steven': 0.38; 'something': 0.38; 'think': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'browser': 0.61; 'full': 0.63; 'tag': 0.64; 'url:asp': 0.81; 'margins': 0.84; 'stop,': 0.84; 'subject:interesting': 0.84; 'mere': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=7mnVGZtAqLc5mW1evBsI+TL/SzBhibJEVpdKcmlUpkE=; b=eH2VHTfwQ+JTVBShUxlPdVWp9s1vxMk3SDkTuw5zwXxxZ9QWNIHGvlaPLo75ALfSdN jSLwYWjRlq0gU/tbLz3sKSn7W8regWMv3O4MU2wssb/HbcJsRj7P367l60zMlhgdAfkK flLCsGKYluvP5jDnm4AC/8cFJN7kb5pHtYx3o=
MIME-Version 1.0
In-Reply-To <4e1d7c66$0$30000$c3e8da3$5496439d@news.astraweb.com>
References <CAAyd8ckM7WqzTpXzVFFocEFQcm8oeHPQGAv1KH6BcBj6kqA2WA@mail.gmail.com> <mailman.889.1310393783.1164.python-list@python.org> <MPG.288770fad6930dba989832@news.individual.de> <4e1d7c66$0$30000$c3e8da3$5496439d@news.astraweb.com>
Date Wed, 13 Jul 2011 21:58:19 +1000
Subject Re: An interesting beginner question: why we need colon at all in the python language?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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.973.1310558302.1164.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310558302 news.xs4all.nl 23894 [2001:888:2000:d::a6]:54424
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9385

Show key headers only | View raw


On Wed, Jul 13, 2011 at 9:07 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> The colon indicates that the sentence has more to follow: I think of it as a
> pointer. It doesn't finish the thought, like a full stop, nor is it a mere
> pause, like a comma or semi-colon.
>
>    An indented block on its own is surprising. It just hangs there,
>    with no connection to what was going on before. Why is it indented?
>    Is it connected to the previous sentence?

It's not necessarily surprising, depending on context; the brain
automatically assumes that the indented block was originally said by
someone else.

    The <blockquote> tag defines a long quotation.

    A browser inserts white space before and after a blockquote
    element. It also insert margins for the blockquote element.

http://www.w3schools.com/tags/tag_blockquote.asp

(I didn't need to quote that, I just wanted to go meta and block quote
something about blockquote.)

Having the colon makes it clear that the content is part of the same
general thought (paragraph or sentence).

Chris Angelico

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