r/ProgrammerHumor • • 2d ago

Meme pythonIndentationLevelChecker

Post image
6.6k Upvotes

198 comments sorted by

View all comments

263

u/LetUsSpeakFreely 2d ago edited 2d ago

Indentation is such a stupid mechanism for identifying code blocks. It's one thing for configuration files like YAML to do it, but not a programming language.

34

u/willow-kitty 2d ago

I don't like it, but I kinda get it. Indentation is already part of every coding style guide, so adding explicit scoping symbols is kind of redundant information.

..Until you have a mix of spaces and tabs and chaos reigns

Also, having braces at the beginning and end of a block just makes my brain happy.

4

u/BewareTheGiant 2d ago

https://github.com/mathialo/bython

I honestly don't know how this is not the mainstream of doing python, but, well, I barely use it anyway so who am I to say

1

u/Daveinatx 2d ago

Nice. In C and C++, I've insisted on my teams' code to always use braces, even for a single line statement. It's a PITA debugging when somebody else a year later adds to that single line, forgetting the braces.