this post was submitted on 15 Aug 2025
23 points (96.0% liked)

Programmer Humor

25705 readers
1328 users here now

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

founded 2 years ago
MODERATORS
 

Does anyone remember an old blog post where someone used various Python language hacks to override boolean primitives, such that the statement false == true evaluated as true? I'm 90% sure it was python, but maybe it was some other language.

I've been looking for that post recently, but haven't had any luck.

Thanks to antagonistic for finding it! I guess it was less of an "exploit", and more of a "please don't touch the loaded foot-gun"

you are viewing a single comment's thread
view the rest of the comments
[–] who@feddit.org 3 points 18 hours ago* (last edited 18 hours ago) (1 children)

Python doesn't have true or false keywords, nor any other primitives by those names.

So either you're thinking of a different language, or different identifiers, or someone assigned equal values to variables with those names and then blogged about it.

[–] Antagnostic@lemmy.world 4 points 17 hours ago (1 children)
[–] who@feddit.org 4 points 17 hours ago* (last edited 17 hours ago)

That change is about True and False, not true and false. If OP was thinking of the former pair, it would seem my "different identifiers" guess was correct.