Indentation for code readability

DE devrim.erdem at gmail.com
Fri Mar 30 11:04:45 CEST 2007


Hello,

Here is what I do in C++ and can not right now in python :

pushMatrix()
{
     drawStuff();

     pushMatrix();
     {
            drawSomeOtherStuff()
     }
     popMatrix();
}
popMatrix();

The curly brackets have no functional meaning but increase the
readability significantly. I want to be able to do the same thing in
python. Since curly brackets are not available and indenting without
an if or while conditional doesn't work, I have started to question if
this is possible in python at all.

Any ideas ?

MDE




More information about the Python-list mailing list