bool value 'False' no memory address?

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Apr 4 06:46:19 EDT 2007


autin a écrit :
> such as:
>>>> b = False
>>>> id(b)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: 'bool' object is not callable
> 

IMVHO, you shadowed the builtin id() function with a boolean somewhere 
else...

Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> b = False
 >>> id(b)
135506080
 >>>
 >>> id = False
 >>> id(b)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: 'bool' object is not callable
 >>>

My 2 cents...



More information about the Python-list mailing list