MTGZone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Destide@feddit.uk to Programmer Humor@lemmy.mlEnglish · 12 days ago

Infallible Code

lemmy.ml

message-square
165
fedilink
462

Infallible Code

lemmy.ml

Destide@feddit.uk to Programmer Humor@lemmy.mlEnglish · 12 days ago
message-square
165
fedilink
  • VitabytesDev@feddit.nl
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    11 days ago
    def is_even(num):
        num = num & 1
        if num == 0:
            return False
        if num == 1:
            return True
        raise ValueError(f'what the fuck')
    

    EDIT: forgor to edit the numbers

    • kryptonianCodeMonkey@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      11 days ago

      If you’re waiting for “num & 1 == 2”, you’re going to be very disappointed

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.

  • 20 users / day
  • 702 users / week
  • 2.88K users / month
  • 2.99K users / 6 months
  • 1 local subscriber
  • 37.4K subscribers
  • 404 Posts
  • 810 Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org