On Wed, 07 Dec 2005 15:26:59 +0000, Zeljko Vrba wrote: > Braces are very convenient to match block start and end. Open a C program > in the VI editor, and press % in command mode on some brace.. It will take > you to its matching brace. How do you do something like that with python code > (or any code that is based purely on indentation..)
(1) You don't need to, because you can *see* where the indentation changes, so you don't need to rely on your editor counting for you. (2) And if you do need to, then you should use a smarter editor that understands indentation levels, not just braces. Braces are superfluous if you use consistent indentation, and indentation is superfluous -- to the compiler -- if you use braces. But indentation is *not* superfluous to the human eye: we can parse indentation very easily, but nested braces/brackets only with great difficulty. That's why programmers in languages that ignore indentation still indent their code, or at least the sensible ones do. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list