Compare source code

Ben Finney ben+python at
Thu Nov 4 00:53:40 CET 2010

Seebs <usenet-nospam at> writes:

> On 2010-11-03, Steven D'Aprano <steve-REMOVE-THIS at> wrote:
> > Python does explicitly mark blocks. It does it by changes in
> > indentation. An indent is an explicit start-block. An outdent is an
> > explicit end- block. There is nothing implicit in a change in indent
> > level.
> What's the token that marks the end of a block, corresponding to the
> colon used to introduce it?

You have introduced this requirement for tokens; it's fallacious. The
direct answer is: tokens aren't part of the requirement to be explicit.

The more general answer is: the block is explicitly ended where the
indentation ends.

 \     “I must say that I find television very educational. The minute |
  `\       somebody turns it on, I go to the library and read a book.” |
_o__)                                                    —Groucho Marx |
Ben Finney

More information about the Python-list mailing list