Permanent objects?

Armin Steinhoff a-steinhoff at web.de
Wed Dec 25 04:51:10 EST 2002


Tim Peters <tim.one at comcast.net> wrote in message news:<mailman.1040755975.30086.python-list at python.org>...
> [Tom Zych]
> > Here's an odd thing Python 2.2 does:
> >
> > >>> x = 0
> > >>> y = 0
> > >>> x is y
>  1
> > >>> x = 99
> > >>> y = 99
> > >>> x is y
>  1
> > >>> x = 100
> > >>> y = 100
> > >>> x is y
> > 0

Could someone explain in _detail_ why this happens?

Armin



More information about the Python-list mailing list