On Sep 13, 3:12 pm, Peng Yu <pengyu...@gmail.com> wrote: > Hi, > > I want to understand why python use indentation to denote block of > code. What are the advantages of it? Is there a style in python to > denote a block of code the same as that of C++ (with '{}')? > > One disadvantage of using indentation to denote a block of code is > that the runtime to automatically indent a python code would be about > a few times more than the runtime to automatically indent a C++ code > of the same length (both are in vim). > > Regards, > Peng
Looking at your other post regarding "strict mode", I have to comment. I think you are looking for a different language. What you are hoping to change about the language are some of the major things that make it a joy to program for me. Braces, static typing, no indentation... What's next? Would you like semicolons? I suggest you spend some time just programming it the way it was made to be programmed, and quit trying to turn it into Perl or any other language. If after a week or two, you don't like it, then move on. And save us the complaints. ~Sean -- http://mail.python.org/mailman/listinfo/python-list