bool value 'False' no memory address?

Tim Golden mail at timgolden.me.uk
Wed Apr 4 12:49:53 CEST 2007


Jakub Stolarski wrote:
> On Apr 4, 12:36 pm, "autin" <plutoinch... at gmail.com> wrote:
>> such as:>>>b = False
>>>>> id(b)
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>> TypeError: 'bool' object is not callable
>>
>> ---
>> how to desc it?
> 
>>>> b = False
>>>> id(b)
> 135311308
> 
> python 2.4, FreeBSD 6.2
> 

The OP's almost certainly accidentally used
"id" as a flag somewhere previously:

<code>
id = True
#
# .. do other stuff
#
b = False
id (b)
</code>

Also, I'm not quite sure what he wants to
do with the id, which is only the machine
address (if that's what it is) by implementation
detail.

TJG



More information about the Python-list mailing list