Please don't treat numbers as booleans. It makes sense when you are checking for None or for emptiness, but in case of numbers it's just confusing. That's an artifact of the C heritage all languages and programmers have nowadays, but that doesn't mean we should be using it.
Please don't treat numbers as booleans. It makes sense when you are checking for
None
or for emptiness, but in case of numbers it's just confusing. That's an artifact of the C heritage all languages and programmers have nowadays, but that doesn't mean we should be using it.Agreed!
I totally agree but the sad thing is that many of these practices are considered "pythonic".