syntax

Xavier Bec xav at buf.fr
Fri Jul 30 11:48:30 EDT 1999


Hello,

Why are the double dots ":" necessary after a if, for or while
instruction ?
All the others instructions are terminated with a cariage return but not
condition or loop ones. I know that a semi-column is facultative and
only used if you have to put a second instruction on the same line. Why
is not the same for if, etc.

if i == 10
	print i
	print "test"

or

if i == 10 : print i; print "test"

Any suggestion ?

-- 
Xavier Bec                         mailto:xav at buf.fr
BUF Compagnie                      http://www.buf.fr
3, rue Roquepine             tel: (33) 1 42 68 18 28
75008 Paris - FRANCE         fax: (33) 1 42 68 18 29




More information about the Python-list mailing list