Semantic indentation (OpenGL)
Marek Kročák
mk at ji.cz
Fri Oct 12 09:52:16 EDT 2001
I am very very sorry for opening such a topic again. Before anything else
I must say that I *love* Python's way of treating indentation.
When I was at school we were doing a lot of OpenGL (in VC++). I have often
(not always but many times) used following way of indentation for making
my code a bit cleaner:
glBegin(GL_POINTS);
...
glVertex3f(...);
...
glEnd();
These are syntactically at the same level (compiler's point of view), but
semantically not (library's point of view). Unfortunately python does not
allow me to use this formatting any more.
I wonder how (whether?) do other programmers cope with this. Actually this
is not a problem, I am just curious.
--
Marek Kročák
(Marek Krocak)
mk at ji.cz
More information about the Python-list
mailing list