Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Its the fault of the editor, not the language. If you develop in python, why didnt you got into this problem earlier? Pythons Syntax uses tabs or spaces to define blocks.
@stop you have a point of course, that's why I ask, why is it not configurable? And who actually likes this feature so much they think it should remain mandatory, given it has never changed? Please explain why you think it's a good thing?
Semicolons are optional. Why not the same for brackets? 🤔
@jkommeren its possible to use tabs or spaces. So you can use one space to indent a block. And this is the core feature of python.
the only thing you need to remember is to use the same amount of spaces for each level in the whole file.
@jkommeren the standard indentation is 4 spaces. And i think its better than to search where i missed a curly brace.
I'm not sure what the intention of Python was.... Never looked it up.
But many devs don't realize / don't want to realize that code has a flow.
Proper formatting, no nested if/else stuff, ... makes it easy to follow the code flow.
I think that Pythons way is hard to get at the beginning, but code formatting matters.
And usually code formatting discussions end up with a room full of toddlers throwing stuff at each others "cause MIINEEE is best".
Hence I'm thankful that Python implemented this.
In PHP there are PSRs (recommendations) and while good devs just accept and follow them as a compromise, we had quite a lot of toddler discussions in teams... *rolls eyes*
The "nice" way doesn't work most of the time, the enforced way will work and will cost less time, less stress and is easier.
Thanks Python ;)
Yeah, there really could be less parentheses in Lisp...
What browser are you using? It is possible that the browser prevents jupyter from overriding tab navigation because somebody had a power trip and decided how everything that runs in a browser window should work.
@homo-lorens good point! I was using Edge. I'll give some others a try!
Theres your first mistake.
I like python. I use it. And even I think its a mistake. A beautiful one for certain.
Also is jupyter notebook half as good as it sounds?
@stop I actually wouldnt mind a worse-of-both-worlds option.
colon to open blocks, and semicolon to close blocks. These two pieces of punctuation replace curly braces and just seem to be happy middle ground. No more fucking with invisible formating. Semicolon used to end lines, now it closes scopes, which feels like a natural evolution, and colons open scopes, which to a python user also seems appropriate.
And I've meant more than a few people that absolutely *hated* it, which tells me some are bound to enjoy the concept.