Grouping code by indentation - feature or ******?
Terry Reedy
tjreedy at udel.edu
Fri Mar 25 13:41:28 EST 2005
"Antoon Pardon" <apardon at forel.vub.ac.be> wrote in message
> 1) It makes it hard to see how many levels are dedented at the end of
> a suite, and sometime makes it difficult to see where the end
> of a suite is. If e.g. you are looking at the code spread over
> two pieces of paper, it is sometimes hard to see whether the
> suite ends at the end of the first page or not.
One can use appropriately indented comment lines instead of closing
brackets for this purpose.
> 2) It makes it hard to introduce some kind of new syntax constructs.
I consider this as much a plus as a minus ;-)
> 3) Sometimes the structure of the algorithm is not the structure
> of the code as written, people who prefer that the indentation
> reflects the structure of the algorithm instead of the structure
> of the code, are forced to indent wrongly.
Do you have any simple examples in mind?
Terry J. Reedy
More information about the Python-list
mailing list