…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
    9
    arrow-down
    12
    ·
    5 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
      15
      arrow-down
      1
      ·
      5 months ago

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

    • Diplomjodler@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      3
      ·
      5 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
        4
        arrow-down
        1
        ·
        5 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.

    • AdamBomb@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      5 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?