Why bool( object )?

r rt8396 at gmail.com
Wed Apr 29 09:56:22 EDT 2009


On Apr 28, 7:22 am, "Colin J. Williams" <c... at ncf.ca> wrote:
> Lie Ryan wrote:
>
> I'm puzzled by the last sentence:
>
> *** Python 2.6.2 (r262:71605, Apr 14
> 2009, 22:40:02) [MSC v.1500 32 bit
> (Intel)] on win32. ***
>
> >>> bool(0)
> False
> >>> bool(-1)
> True
> >>> bool(-100)
> True
>
> Colin W.

What's wrong with "Lie Ryan" living up to his name? :)



More information about the Python-list mailing list