> Making syntax as “human-readable” as possible should always be the highest priority. We could unlock so much potential this way.
I think there is a balance to strike here.
I often like to work with code by cutting and pasting sections around and then hitting the format hotkey to align everything.
I enjoy the guarantee that as long as the syntax is correct, it doesn't matter how I type out the code because I'll just hit the formatter hotkey immediately afterwards and it will apply the correct indentation and lay it all out nicely
Obviously that's impossible in Python and it makes working with it really frustrating to me, it feels so delicate, I almost don't want to touch the code because I'm always accidentally changing the indentation, it's a real limit of this "human-readable" syntax in my opinion.
That’s definitely possible in Python. Maybe not if you’re using the simplest text editor. But regardless of whether it’s NVIM or Visual Studio Code, you can easily jump to the end of a line, press Return, and the code will be inserted with the correct indentation. RUFF or BLACK do the rest, and they do it quite intelligently.
Oh interesting, I didn't know! How reliable is it? Does it work well even if you partly copy functions / with blocks etc. ?
I just tried it in vscode, it didn't work at all, copy pasted a single line to another function and it kept its indentation and vscode showed a pylance error about unexpected indentation.
I just have the official Python extension by Microsoft, perhaps some more configuration is required?
I don't really write any Python, I'm sure there is a way to improve the experience.
> Obviously that's impossible in Python and it makes working with it really frustrating to me, it feels so delicate, I almost don't want to touch the code because I'm always accidentally changing the indentation
Skill issue. I just press my “paste with correct indentation” hotkey and move on.
I think there is a balance to strike here.
I often like to work with code by cutting and pasting sections around and then hitting the format hotkey to align everything.
I enjoy the guarantee that as long as the syntax is correct, it doesn't matter how I type out the code because I'll just hit the formatter hotkey immediately afterwards and it will apply the correct indentation and lay it all out nicely
Obviously that's impossible in Python and it makes working with it really frustrating to me, it feels so delicate, I almost don't want to touch the code because I'm always accidentally changing the indentation, it's a real limit of this "human-readable" syntax in my opinion.