this post was submitted on 17 Aug 2024
709 points (95.3% liked)

Programmer Humor

32047 readers
1390 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 month ago

wanted to add something to the end of a for-loop, but had too little indentation

To address this, I prefer reducing length & depth of nested code, so the for/while is rarely ever not visible along with everything inside it. Others have success with editors that draw indentation lines.

opening up new/anonymous scopes

I occasionally use Python nested functions for this purpose