Grouping code by indentation - feature or ******?
Antoon Pardon
apardon at forel.vub.ac.be
Tue Mar 29 02:47:36 EST 2005
Op 2005-03-25, Dennis Lee Bieber schreef <wlfraed at ix.netcom.com>:
> On 25 Mar 2005 14:26:28 GMT, Antoon Pardon <apardon at forel.vub.ac.be>
> declaimed the following in comp.lang.python:
>
>>
>> 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.
>>
> Well, for that, one can follow the recommendations I'd
> encountered back in the early 80s -- pre-Python...
>
> One does not /write/ stuff that spreads over multiple pages (and
> I've even seen that defined to be that the function/procedure in
> question shouldn't even spread beyond a terminal window).
This advise doesn't help.
1) The stuff doesn't has to be spread over multiple pages. One
can have 2 functions, each about three quarter of a page.
The second function will then cross a page boundary.
2) How long is a page? I have worked in differend kind of
environments where the number of lines per page could
differ from 35 to 70.
>> 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 an example?
About any time I have need of a break.
--
Antoon Pardon
More information about the Python-list
mailing list