On Sat, Jan 24, 2009 at 9:38 AM, Vicent <vgi...@gmail.com> wrote: > <snip> >> So, maybe I can adapt the definition of "bool" type, I don't know... >> Anyway, I want to manage 0's and 1's, not "Falses" and "Trues".<snip> >> > Well, I can think of something that might be of some help:
In [18]: bit = {True:1, False:0} In [19]: bit[True] Out[19]: 1 In [20]: bit[False] Out[20]: 0 In [21]: bit Out[21]: {False: 0, True: 1} In [22]: x = False In [23]: bit[x] Out[23]: 0 That might give you something to work with. Anyway, HTH, Wayne
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor