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
-
stop68024yIts 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.
-
jaylord4514y@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? 🤔 -
stop68024y@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. -
jaylord4514y@stop Fair enough. But it would help if i could add them for clarity anyway, single spaces are easy to miss.
I could work around it. But do you actually like that feature? Is it worth its mandatoriness? -
stop68024y@jkommeren the standard indentation is 4 spaces. And i think its better than to search where i missed a curly brace.
-
jaylord4514y@stop hmyeah perhaps I'm too used to the editor fixing it for me once i start inserting brackets 🤔
merci for 4 the spaces, good to know. I'll just keep to that then 🙂 -
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 ;) -
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.
-
Python.
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.
Why the fuck isnt pythons tabbed loop thing something that's configurable?
So many things to like about python, but is there someone on this planet who actually likes this feature?
Trying to use it in Jupyter notebook (browser) is a nightmare, because tab will focus on next ui element.
Or am i missing something?
rant