Hacker News new | ask | show | jobs
by suixo 2465 days ago
I love the "check if integer addition will overflow" in Python:

def adding_will_overflow(x, y): return False

I have no idea if it's actually true but I find that funny.

1 comments

Yeah, integers can't overflow. It will just use all of your memory.

Unless you're using a C bind, like numpy.