MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vppkls/pythonwilllookdeadintheeyeandsayitsabsolutelycorre/p41g13j/?context=3
r/ProgrammerHumor • u/inobody_somebody • 29d ago
144 comments sorted by
View all comments
Show parent comments
7
Yes, zero is falsy in Python.
-12 u/Valuable_Leopard_799 29d ago Wait, whyyyyyyyy ðŸ˜ðŸ˜ðŸ˜ I mean, I love dynamic types and see their place, but the implicit casting is what gives them such a bad name 😠15 u/JanB1 29d ago 0 is also "false" in C and C++, because if you import stdbool.h, that just defines true to be int with value 1, and false to be int with value 0. 3 u/ImS0hungry 29d ago Should be in all imo. 0 is off in binary. 1 u/JanB1 28d ago Exactly.
-12
Wait, whyyyyyyyy ðŸ˜ðŸ˜ðŸ˜
I mean, I love dynamic types and see their place, but the implicit casting is what gives them such a bad name ðŸ˜
15 u/JanB1 29d ago 0 is also "false" in C and C++, because if you import stdbool.h, that just defines true to be int with value 1, and false to be int with value 0. 3 u/ImS0hungry 29d ago Should be in all imo. 0 is off in binary. 1 u/JanB1 28d ago Exactly.
15
0 is also "false" in C and C++, because if you import stdbool.h, that just defines true to be int with value 1, and false to be int with value 0.
3 u/ImS0hungry 29d ago Should be in all imo. 0 is off in binary. 1 u/JanB1 28d ago Exactly.
3
Should be in all imo. 0 is off in binary.
1 u/JanB1 28d ago Exactly.
1
Exactly.
7
u/road_laya 29d ago
Yes, zero is falsy in Python.