On Mar 30, 7:04 pm, "DE" <[EMAIL PROTECTED]> wrote: > 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 ? >
You *can* use round brackets and/or square brackets. E.g. def pushMatrix(): drawStuff() pushMatrix() ( drawSomeOtherStuff() ) [ drawEvenMoreStuff() ] popMatrix() Whether you *should* do that is a different question ... It's a bit like an English definition of a Scottish gentleman: one who can play the bagpipes, but doesn't :-) HTH, John -- http://mail.python.org/mailman/listinfo/python-list