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?

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 2011-07-13 21:58 +1000
Subject Re: An interesting beginner question: why we need colon at all in the python language?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.973.1310558302.1164.python-list@python.org> (permalink)

Show all headers | 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