How to determine the bool between the strings and ints?

Marc 'BlackJack' Rintsch bj_666 at
Fri Sep 7 20:30:36 CEST 2007

On Fri, 07 Sep 2007 18:49:12 +0200, Jorgen Bodde wrote:

> As for why caring if they are bools or not, I write True and False to
> the properties, the internal mechanism works like this so I need to
> make that distinction.

Really?  Can't you just apply the `int()` function?

In [52]: map(int, [1, 0, True, False])
Out[52]: [1, 0, 1, 0]

	Marc 'BlackJack' Rintsch

More information about the Python-list mailing list