• UlrikHD@programming.dev
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    10 months ago

    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.

    • joey_moey@feddit.dk
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      10 months ago

      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.

      • mexicancartel@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 months 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