this post was submitted on 05 Sep 2023
156 points (79.3% liked)

Programming

17511 readers
274 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Duralf@lemmy.world 10 points 1 year ago (2 children)

This is a holy war that I will gladly fight again and again! I can't believe that soft tabs are more popular, especially in python!

[–] _stranger_@lemmy.world 3 points 1 year ago

That is because they are superior.

spatium vult.

[–] Whisp@kbin.social 1 points 1 year ago (1 children)

Python noob here. I thought you were only supposed to use spaces with python and tabs would give you indentation errors?

[–] UlrikHD@programming.dev 4 points 1 year ago (1 children)

Tabs work fine, you aren't allowed to mix, indentation must be consistent.

[–] kevincox@lemmy.ml 0 points 1 year ago

Actually I think you can technically mix. They have a "conversion factor". But don't, because then the code will look like crap on any other tab size (defeating the point of using tabs in the first place)

I think it would be better that each line needs to start with the exact same bytes to be considered within the same indent level. But I don't think that is the decision Guido made.