Indentation for code readability
jkn
jkn_gg at nicorp.f9.co.uk
Sat Mar 31 10:05:58 EDT 2007
If I wanted to mark out stack depth stuff like this in python, I'd do
it
with some form of stylised comment, like this:
# LEVEL 0
pushMatrix():
# ....LEVEL 1
drawstuff()
pushMatrix()
# ........LEVEL 2
drawSomeOtherStuff()
popMatrix()
# ....LEVEL 1
popMatrix()
# LEVEL 0
(there's probably a better comment form for your specific
requirement).
Any decent modern editor should be capable of being set up to
highlight such lines in a colour/style of your choice, and you then
set your eyeball filter to look for those lines when you want to be
sure of where you are.
jon N
More information about the Python-list
mailing list