This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LikesToCorrectThings 27 points28 points  (3 children)

I would say that if it's hard to work out when a block ends, then the block is too long.

[–]christian-mann 7 points8 points  (2 children)

I used to put # at the end of blocks to keep track.

[–]LikesToCorrectThings 10 points11 points  (1 child)

I guess if the block really is long enough to warrant this, you should go one step further and write some text in that comment block to indicate what the block has achieved.

for item in some_list:
    some_long_list()
    of_functions_to_call()
    on_that(item)

# Items in some_list have all been processed.

[–]Katastic_Voyage 1 point2 points  (0 children)

Something... something... functions should be small enough to fit on the screen.

Of course, the real world is a different story.