Blåhaj Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago

The Perfect Solution

programming.dev

message-square
67
link
fedilink
672

The Perfect Solution

programming.dev

JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago
message-square
67
link
fedilink
  • Mastershelf@lemmy.one
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    TIL Python dictionaries allow trailing commas.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Yeah, I think, that’s only really JSON which is so pedantic about it…

      • owenfromcanada@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Yeah…

        sweats nervously in C

    • renzev@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Python is so great (half-sarcasm) that a trailing comma on its own constitutes a tuple (immutable list):

      mytuple = 4,
      assert len(mytuple) == 1
      assert mytuple[0] == 4
      

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 521 users / day
  • 2.87K users / week
  • 7.42K users / month
  • 18.3K users / 6 months
  • 481 local subscribers
  • 24.8K subscribers
  • 1.5K Posts
  • 48K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org