this post was submitted on 05 Sep 2023
1336 points (97.4% liked)

Programmer Humor

19623 readers
19 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 17 points 1 year ago (1 children)

Python are fine with whatever number of spaces you want to use. You can use 8 spaces which forces you carefully consider each nest, you can use 1 if you're a monster, or you can use tabs if you're enlightened, python only demands consistency.

[–] [email protected] 2 points 1 year ago (1 children)

Yeah I remember picking up a script after a reinstall, and gedit had reverted to default settings. It's fun trying to spot whether it's 1 tab or 4 spaces. After that day, I switched to two spaces as my default.

[–] [email protected] 2 points 1 year ago

All theese indentation issues arises from using spaces instead of tabs. And tabs are really flexible so that everyone can set their text editor to whatever tab length they want and still be consistant