FW: [Tutor] Indentation

Seabrook, Richard rhseabrook@aacc.edu
Wed Jun 4 11:27:15 2003


-----Original Message-----
From:	Guillaume [mailto:willblake@wanadoo.fr]
Sent:	Wed 6/4/2003 10:39 AM
To:	tutor@python.org
Cc:=09
Subject:	[Tutor] Indentation
Hi=20
I don't understand what's the meaning
of this word and his roll in a prog: what does=20
indentation bring to a prog?
Thanx :)=20


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Block-structured programming languages have been important
since the 70s (actually the 60s if you want to go back to
COBOL and Algol), including C, Pascal and many others,
and more recently scripting languages like Perl and Python.
A block is a set of statements executed together, like a
paragraph in text or a clause in a contract.
Most block-structured languages set off blocks with special
symbols like { }, [ ], ( ), or special words like BEGIN ... END.
Python sets off its blocks by indentation -- all the adjacent
statements at the same distance from the left margin (using blanks)
are part of the same block.
Dick S.