Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
At least it teaches you to indent properly. For years I have cringed over people's bad indentation, at least there's some relief now
-
soulsuke7256yThat's the main reason why I quit python. Wasting time finding a line with erroneous tabs/spaces is bigger waste of time than looking for that one missing ;
-
@soulsuke I made a rule in my ide to display spaces only preceded by whitespace in red.
-
Actually, that whole shit stems from the days of punch cards, just like the 80 characters per line.
-
GeaRSiX6426yIt would be fine if there wasn't the issue of tabs vs spaces, or better at least.
Once I had to deal with this problem in a python codebase that had both 💀 -
@GeaRSiX I'm using tabs on the keyboard, but since space using devs earn more on average, my editor converts tabs into spaces.
-
Weird enough, some people actually prefer indentation-based languages to braces/closed-scope-based languages.
-
Gnonpi7876yCome on guys, any IDE detect indentation error and compiler give the line that failed. It's like complaining about missing ';' in other languages
-
@Gnonpi no. It's like pushing a return statement inside a for loop, but there a curly brace would make it more visible. And that a function with a specific return type would show an error.
-
Gnonpi7876y@BugsBuggy ok, then yes an ide wouldn't show it.
Maybe the type hints introduced in Python 3.5 can help with your problem?
Related Rants
Who the fuck came up with the idea of using indentation instead of braces? I wasted 5 fucking hours of my life tracing a bug which eventually came down to incorrect indentation of a return statement which pushed it inside the loop!!!!!!!!!!!!!!! FML
And the PR has already been merged into master! How will I face everyone on Monday!
rant
every-other-sane-language
indentation
python