• graphite
    link
    fedilink
    arrow-up
    39
    ·
    2 years ago

    wym just

    def piss(): pass

    substitute accordingly 🤙

    • egeresOP
      link
      fedilink
      arrow-up
      22
      ·
      edit-2
      2 years ago

      Now that I think about it, you can just write piss and it counts as writing a variable but not assigning it 🙃 (after having assigned piss at the beginning of the code!)

  • asudox
    link
    fedilink
    arrow-up
    19
    ·
    edit-2
    2 years ago

    def piss(): pass; piss = piss()

    Here you go.

    • egeresOP
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      But actually, You can just replace that line with piss = None, assigning piss = piss() does not invoke the former method when writing the new variable “standalone”

    • marcos
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Or m4 if you are into it.

      M4 + python would make for a great combo.

        • marcos
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          But…

          What is more pythonic than semantic whitespace?

          • muzzle
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            Preprocessing source code is an awful idea and I wish it never became widespread.

            I used to hate semantic whitespace, but I came around when I was using it anyway.

            • marcos
              link
              fedilink
              arrow-up
              3
              ·
              2 years ago

              Oh bummer… I was so glad believing somebody understood the m4 joke.

              Text preprocessors for code are awful. But the m4 + python combo is so full of landmines that I’m wondering if I should try it.

              • muzzle
                link
                fedilink
                arrow-up
                2
                ·
                2 years ago

                I can only defend myself with the good old “it is impossible to write a Y̶o̶u̶T̶u̶b̶e̶ Lemmy comment stupid enough that everyone will realise it is ment to be sarcastic”

                • marcos
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  2 years ago

                  I would say that one should expect a high probability of comments on “Programmer Humor” being sarcastic. But deep down I know you are right.