…from people who seem to refuse to install paredit or coloring plugins for either? ps lisp syntax ftw, it’s a feature!

  • Lysergid@lemmy.ml
    link
    fedilink
    arrow-up
    8
    arrow-down
    10
    ·
    6 months ago

    No it’s how Python wants you to format. Many times I want to separate two logical sections in one function and can’t coz Python go crazy

    • umfk@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      6 months ago

      Can you give a concrete example? Because I don’t understand what you mean.

    • AdamBomb@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      6 months ago

      Are you saying that you want to separate your two logical sections by having different levels of indentation and that’s what makes Python go crazy?

    • Diplomjodler@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      3
      ·
      6 months ago

      Just put them in separate functions. If you have too many levels of indent, your code is convoluted. Sticking to the line length limit sometimes forces you to write more lines than you’d like to. But it makes everything so much more readable that it’s 100% worth the trade off

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        6 months ago

        What if the logic is more readable in one function?

        I use whitespace to make my code more legible, python forces more whitespace consistency but it comes at the cost of limiting the legibility.