True
Daniel Klein
danielk at aracnet.com
Tue Aug 5 08:56:25 EDT 2003
On Mon, 04 Aug 2003 02:13:57 GMT, Lee Harr <missive at frontiernet.net>
wrote:
>In article <fucrivcvd2mel7k51ij1hktb55gqnmk9ic at 4ax.com>, Daniel Klein wrote:
>> In Python 2.2 I use to have
>>
>> true = (1 == 1)
>> false = not true
>>
>> This was at the recommendation of someone on this list some time ago.
>> The reason (if I remember correctly) was that setting
>>
>> true = 1
>> false = 0
>>
>> were not true booleans.
>>
>> Now the expression (1 == 1) returns 'True', and caused a bug in my
>
>Actually, it returns True, not 'True'
>
In this case, it _did_ return a literal string of 'True' cuz I was
using str(true) and str(false). That was the nature of the buglet.
Before str(true) would return return '1' and str(false) would return
'0'. Sorry that I didn't include this bit of information in the
original post :-(
Dan
More information about the Python-list
mailing list