Hacker News new | past | comments | ask | show | jobs | submit login

WHAT, always use four spaces instead of TAB?? Oh my god.



I feel like I'm either too young or somehow sheltered to understand why people care about this. Hasn't it been very standard for a while now to press the tab key and have your editor insert 4 spaces?


Yeah, probably. I'm not so comfortable with all the whitespace in Python, but the thought of having to tap space 4x constantly while writing code is so hugely off-putting to me as an idea. I'd rather just continue pressing tab a single time, all the time, until the day I die.


I don't think anyone taps space four times; they just set tab to insert four spaces. So from a typing perspective, there's no difference.

It's a pretty standard setting in every editor I've used, including vim.


Every single editor has some equivalent to `expandtab`, so you just use that instead of pressing space x times.


Do you have to press tab 3 times if you're inside blocks?

Do you use notepad.exe or something more ancient like edline?


For reference, this has always been the recommended style in PEP 8 (initially published in 2001). https://peps.python.org/pep-0008/#indentation


Jesus christus


In comparison, Godot's python-like GDScript prefers tabs:

https://docs.godotengine.org/en/stable/tutorials/scripting/g...

I have come to appreciate tabs here, but you have to have already established tabs as the prevailing convention for this to work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: