Why indentation is use to denote block of code?

r rt8396 at gmail.com
Sun Sep 13 18:57:24 EDT 2009


On Sep 13, 5:12 pm, Peng Yu <pengyu... at gmail.com> wrote:
> Hi,
>
> I want to understand why python use indentation to denote block of
> code. What are the advantages of it? Is there a style in python to
> denote a block of code the same as that of C++ (with '{}')?

Easy! because Python is simplistic programming bliss!

Indenting code makes the blocks easier to read and forcing this on
Python programmers is a good thing. And as a side effect "dedent" can
be used to find the end of a block. Some languages still use block
ending notations like the redundant "end". I think they do this from
an inability to break from old habits and fear of change.

You will find Python to be a revolutionary language that does not
confine itself to closed minded archaic redundancies and asinine
design flaws. Pythons simplistic syntax, elegant coding structure, and
beautifully intelligent design, encompass the traits that every twenty
first century language should aspire to be.

Right now you can think of yourself as the poor Neo, completely
oblivious of the matrix(C) that blinds you to reality. You can think
of Python as Morpheus, the one who shall open your eyes to the
atrocities of C and other evil languages of who's names i shall not
utter here. This should enlighten you a bit...

http://tiny.cc/TheBlindingMatrixOfC



More information about the Python-list mailing list