bool value 'False' no memory address?
autin
plutoinchina at gmail.com
Wed Apr 4 06:52:29 EDT 2007
My false!uh,i didnot understand it clearly.
On Apr 4, 6:46 am, Bruno Desthuilliers <bruno.
42.desthuilli... at wtf.websiteburo.oops.com> wrote:
> 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