comments inside blocks

Peter Hansen peter at engcorp.com
Thu Jan 2 11:28:47 EST 2003


P at draigBrady.com wrote:
> 
> Hmm but the editor should be able to distinguish between
> these 2 cases IMHO:
> 
> for i in range(10):
>      print i
> #comment nothing to do with for

for i in range(10):
    print i
# comment having something to do with the for

Can it distinguish between these two cases then?

In my cases, this is a much more common situation.  I would
*never* attach a following comment like you have without
whitespace to separate it from the previous block.  I think
the folding is "correct".

-Peter




More information about the Python-list mailing list