this post was submitted on 14 May 2024
304 points (91.1% liked)
Programmer Humor
32558 readers
415 users here now
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.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Someone else points out that Python's native
bool
is a subtype ofint
, so adding abool
to anint
(or performing other mixed operations) is not an error, which might then go on to cause a hard-to-catch semantic/mathematical error.I am assuming that trying to add a NumPy
bool_
to anint
causes a compilation error at best and a run-time warning, or traceable program crash at worst.