you are viewing a single comment's thread
view the rest of the comments
[–] 22 points 8 months ago (2 children)

You can use spaces in Python.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 23 points 8 months ago (7 children)

    Two, three or four spaces? If you answer wrong I'll never forgive you

  • source
  • parent
  • hideshow 14 child comments
  • [–] 16 points 8 months ago

    Whatever your place defines as a standard. I’ve seen ugly code in C, JavaScript, Java, etc., that uses them all over the place because they’re not mandatory.

    If you don’t have consistent indenting, your code looks like copy/paste from several sources; but if you do have consistent indenting, then the indenting of Python is a non-issue.

  • source
  • parent
  • [–] 7 points 8 months ago (1 child)

    Per the Linux kernel coding style:

    Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 12 points 8 months ago (2 children)

    Indentation-driven control flow is one of the most cursed things ever invented, excluding things explicitly designed to inflict pain or death.

  • source
  • parent
  • hideshow 4 child comments