Neal Becker, 10.09.2010 20:23:
IN [3]: bool('False')
Out[3]: True
Not inconsistent at all:
>>> bool('false')
True
>>> bool('true')
True
>>> bool('')
False
>>> bool(32)
True
>>> bool(0)
False
It simply follows Python's boolean coercion rules.
If you consider it inconsisten w.r.t. int('32'), then what about
>>> list('[]')
['[', ']']
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
