A completely unnecessary Python project that explores dozens of ways to prove, confirm, calculate, deduce, or spiritually interpret whether zero equals zero.
Why?
Because I was bored. And I like stupid ideas.
Sure, you could just write
0 == 0,
but where's the fun in that?
This repo is a growing collection of unreasonably complicated ways to check if 0 == 0.
Yes, the answer is always True. No, that won't stop us.
- Using
math.acosandcosto confirm 0 - Shuffling a list with just one zero in it
- Comparing the memory size of zero with itself
- Counting the length of an empty string
- Using recursion for no reason
- Rounding the sine of π
- Reading
"0"from a formatted string and feeling proud
Wanna make this dumber? You're welcome here.
All you have to do is:
- Add a new function to
is_zero_zero.pythat returnsTrue(because zero is zero). - Make it as cursed, overengineered, or unnecessarily clever as you want.
- Bonus points if your logic makes someone question reality.
- Open a pull request.
Examples:
def is_zero_using_quantum_mechanics():
# Replace with 12 lines of nonsense
return TruePlease do not write smart or clean code. We don’t do that here.
python is_zero_zero.py
You'll see a bunch of checks that all (somehow) confirm that 0 is indeed 0.
Because the internet needs more weird stuff.
Because overengineering is a sport.
Because someone once made a repo called is_even that checks if a number is even — with one if condition per number — and I felt challenged.
MIT — because chaos should be free.
If you're reading this and you're like
“This is the dumbest thing I’ve seen all week”
...mission accomplished.
PRs welcome. Stars appreciated. Sanity optional.