is and ==

Arne Martin Güettler arneh at ifi.uio.no
Mon Feb 26 18:34:22 CET 2001


Oleg Broytmann wrote:
> 
> On Mon, 26 Feb 2001, Steve Purcell wrote:
> > Integers are both equal *and* identical:
> >
>    Not all integers - only 0 <= i < 100:
> 
> >>> a = 217
> >>> b = 217
> >>> a is b
> 0
> >>> a == b
> 1


They might be:

>>> a,b = 217,217
>>> a is b
1
>>> a == b
1


:-)

-- 
-am



More information about the Python-list mailing list