Interesting behaviour of the assignment

Emile van Sebille emile at fenx.com
Thu Dec 28 11:03:54 EST 2000


IIRC, the integers through 99 are interned, and all
references have the same ID.

--

Emile van Sebille
emile at fenx.com
-------------------


"June Kim" <junaftnoon at nospamplzyahoo.com> wrote in message
news:92f4gk$qk6$1 at news.nuri.net...
> >>> a=100
> >>> b=100
> >>> a is b
> 0
> >>> a=99
> >>> b=99
> >>> a is b
> 1
>
> Is this an intended/expected result? What is the lying
structure beneath
> this?
>





More information about the Python-list mailing list