integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

Paul Rubin no.email at nospam.invalid
Mon Jul 12 23:58:39 EDT 2010


Steven D'Aprano <steve-REMOVE-THIS at cybersource.com.au> writes:
> What Python does instead is to accept *any* object in a context where 
> other languages (such as Pascal) would insist on a boolean.

I'm aware of what Python does, just saying I can sympathize with the
sentiment that explicit conversions would make more sense.  I wouldn't
change it in Python since it's what we're all used to, but if I were
designing a language from scratch I'd probably make it explicit.



More information about the Python-list mailing list