Python Grammar (was Re: A TYPICAL NEWBIE MISTAKE?)

Warren Postma embed at
Mon May 15 11:07:35 EDT 2000

> if yes:
>    print "yes"
> Guido didn't want 10 ways (or even 2) to spell things, so the colon is
> mandated for all.

I'd like it if IDLE, or PythonWin would automatically insert the colon:

I Type:

if abc<ENTER>


if abc:
   _ <- cursor position

At the exact moment you hit enter on the above line, the editor would check
for the colon and, if not in a comment, add that colon for me. Same with
"for", and other places like that.


More information about the Python-list mailing list