Revision 2 as of 2008-08-12 22:38:18

Clear message

SEE:[wiki:Ten_things_people_want_to_know_about_Python Ten things people want to know about Python]

Answer
  • You're going to indent your code even if your language uses brackets or other start/end separators, if you want it to be readable and understandable. Extra notation beyond what we should be doing regardless of the language doesn't add anything, except for clutter.
  • In order to separate blocks of code (like for loops, if blocks and function definitions) the compiler / interpreter needs something to tell it when a block ends. Curly braces and end statements are perfectly valid ways of providing this information for the compiler. For a human to be able to read the code indentation is a much better way of providing the visual cues about block structure. As indentation also contains all the information for the compiler, to use both would be redundant. As indentation is better for humans, it makes sense to use that for the compiler too.

Unable to edit the page? See the FrontPage for instructions.