bool and unicode
oussoren at cistron.nl
Wed Aug 27 08:30:37 CEST 2003
On Tuesday, 26 August 2003, at 8:16, Roman Yakovenko wrote:
>>>> bool( u'True' )
>>>> bool( u'False' )
> May somebody explain or give a reference to reason of such behaviour?
That has nothing to do with unicode, bool('False') is also True.
help(bool) says: Returns True when the argument x is true, False
otherwise. That is, x = bool(y) is the same as:
x = True
x = False
More information about the Python-list