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

Terry Reedy tjreedy at
Wed Jul 13 18:18:18 CEST 2011

On 7/13/2011 2:26 AM, alex23 wrote:
> Thomas Jollans<t... at>  wrote:
>> Coincidentally, Guido wrote this blog post just last week, without which
>> I'd be just as much at a loss as you:
> It's also part of the Python FAQ:

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,
     return a+b+c

All indentation was done automatically by IDLE's editor.

Terry Jan Reedy

More information about the Python-list mailing list