stackyFACTS
Technology

In Python, True + True equals 2

HERE’S THE INTERESTING PART

Philosophy meets mathematics in the most unhelpful way possible. Python treats boolean values as integers under the hood, meaning 'True' is just a 1 in disguise, allowing you to legally perform math equations on fundamental truths.

In Python, True + True equals 2
STACKY / Technology
One discovery leads to another.

Keep exploring facts in this topic.

Technology →
STACKY FOR IPHONE

A bigger world.
One discovery
at a time.

Keep discovering with Stacky. Interesting facts in an app that is always within reach.

Download on the App Store
ONE MORE DISCOVERY?

Keep exploring

All in this topic →
Python was named after Monty Python, not snakes
Technology

Python was named after Monty Python, not snakes

The massively popular programming language has absolutely nothing to do with giant snakes. Its creator was just weirdly obsessed with watching Monty Python…

Discover more
Why Floating-Point Math Turns Zero Division Into Infinity
Technology

Why Floating-Point Math Turns Zero Division Into Infinity

Because crashing the program was apparently too mainstream. If you divide a floating point decimal by zero, the system doesn't error out; it just hands you a…

Discover more
Hash collisions make different files look identical
Technology

Hash collisions make different files look identical

Cryptographic hashes squeeze gigantic files down into short alphanumeric codes. Because the final code has a fixed length, math dictates that eventually, two…

Discover more
Python forcefully limits recursion depth to one thousand
Technology

Python forcefully limits recursion depth to one thousand

Because the interpreter doesn't trust you to not blow up your own computer. If a Python function calls itself more than a thousand times, the system abruptly…

Discover more
Computer algorithms are technically named after Muhammad ibn Musa al-Khwarizmi, a brilliant ninth-century Persian mathematician whose groundbreaking work fundamentally established the foundation of modern algebra.
Technology

Computer algorithms are technically named after Muhammad ibn Musa al-Khwarizmi, a brilliant ninth-century Persian mathematician whose groundbreaking work fundamentally established the foundation of modern algebra.

Computer algorithms are technically named after Muhammad ibn Musa al-Khwarizmi, a brilliant ninth-century Persian mathematician whose groundbreaking work…

Discover more
How one NaN can ruin every calculation after it
Technology

How one NaN can ruin every calculation after it

The zombie virus of software engineering. Once a single NaN gets calculated in a long chain of mathematical operations, it immediately turns every subsequent…

Discover more
StackyMore discoveries in the app
Download on the App Store