Is there a boolean(somestring) equivalent of int(somestring). bool('false') -> True

Vineet Jain vineet at eswap.com
Mon Apr 12 00:47:14 EDT 2004


> For most (all?) built-in types there is one and only one false value.
> If you start to accept multiple false values then you run into the
> types of problems Perl programmers run into. You write code like this:

That makes sense (even though bool('false') == True is counter-intuitive).
I'll stick with my checkStringForBoolean function.

VJ






More information about the Python-list mailing list