comments inside blocks

Peter Hansen peter at
Thu Jan 2 17:28:47 CET 2003

P at 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".


More information about the Python-list mailing list