My Lemny
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
egeres@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago

You can't understand my pain

lemmy.world

message-square
12
link
fedilink
117

You can't understand my pain

lemmy.world

egeres@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago
message-square
12
link
fedilink
alert-triangle
You must log in or # to comment.
  • graphite@lemmy.world
    link
    fedilink
    arrow-up
    34
    ·
    2 years ago

    wym just

    def piss(): pass

    substitute accordingly 🤙

    • egeres@lemmy.worldOP
      link
      fedilink
      arrow-up
      18
      ·
      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!)

      • GitProphet@lemmy.sdfeu.org
        link
        fedilink
        arrow-up
        15
        ·
        2 years ago

        So you’re saying we just have to piss at the very beginning of the code?

        • egeres@lemmy.worldOP
          link
          fedilink
          arrow-up
          9
          ·
          2 years ago

          I bet this was in the original draft of the PEP-8 hahah

  • asudox@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    2 years ago

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

    Here you go.

    • egeres@lemmy.worldOP
      link
      fedilink
      arrow-up
      7
      ·
      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”

      • asudox@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Oh well.

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    2 years ago

    You can use the C preprocessor on any source code.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Or m4 if you are into it.

      M4 + python would make for a great combo.

      • muzzle@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Please don’t.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          But…

          What is more pythonic than semantic whitespace?

          • muzzle@lemmy.world
            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.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 66 users / day
  • 117 users / week
  • 387 users / month
  • 1.49K users / 6 months
  • 0 local subscribers
  • 37K subscribers
  • 1.76K Posts
  • 31.3K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org