this post was submitted on 17 Aug 2024
703 points (95.2% liked)

Programmer Humor

32031 readers
1249 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
[–] Kache@lemm.ee 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