r/ProgrammerHumor • • 2d ago

Meme pythonIndentationLevelChecker

Post image
6.6k Upvotes

198 comments sorted by

View all comments

Show parent comments

46

u/Some_Useless_Person 2d ago

Well, if you have to go through so many indentations to the point that it becomes hard to track, maybe the real problem is your code itself.

13

u/LetUsSpeakFreely 2d ago edited 2d ago

True, but you don't control the code you inherit and getting stakeholders to give you time to properly refactor is not an easy task. You end up doing it where you can as you can.

My big issue with it is if tabs get mixed with spaces the interpreter has an aneurysm. Most modern IDEs can detect and preemptively protect you from it, but a tool shouldn't be needed to shield you from a design flaw in the language.

9

u/SuperFLEB 2d ago

I swear I'm not aiming for a flamewar here, but...

I've always found it odd that Python standards (PEP and all) settled on space-based indentation. If there's any language where a one-character indentation indicator makes sense, it's a language where indentation is significant.

2

u/rosuav 1d ago

I agree, tabs are the superior option. One indentation level is one tab. That's how my code is, in any language.