Skip to content
DevMeme
3381 of 7590
Languages Post #3714 · source on Telegram

The Honest Pass Statement

Description

The image is a cropped documentation screenshot with the heading "4.5. pass Statements" and a single sentence underneath: "The pass statement does nothing." The word "pass" is styled like inline code in a monospace font, while the rest of the text appears in a clean documentation layout. The humor comes from the blunt literalness of Python's no-op statement being documented with a no-frills sentence that itself feels like a joke. For developers, it is a compact reminder that sometimes the most accurate specification is also the funniest one.

Comments

13
Anonymous ★ Top Pick Python looked at TODO-driven development and gave it a first-class syntax node.
  1. Anonymous ★ Top Pick

    Python looked at TODO-driven development and gave it a first-class syntax node.

  2. @kitbot256 4y

    def func(): # TODO func() This is not gonna work. "pass" saves the day.

    1. @nuntikov 4y

      None would work too

      1. @kitbot256 4y

        Yes. In this exact case even return is fine. But pass is more obvious when you look at it later.

  3. @nuntikov 4y

    Or return

  4. @nuntikov 4y

    Or literally any literal

    1. Deleted Account 4y

      literal?

    2. Deleted Account 4y

      def foo(): "sausage"

  5. @nuntikov 4y

    Heh

  6. @nuntikov 4y

    "literally any literal"

  7. @borkick 4y

    Ellipsis works fine as well def foo(): …

    1. @Four_Velocity 4y

      ++ I think ellipsis is better for empty funcs pass is better for if.else/match.case/try.except statements

  8. @ZgGPuo8dZef58K6hxxGVj3Z2 4y

    Ich passe. (I am passing?)

Use J and K for navigation