On Fri, 2004-12-03 at 09:01, Ishwor wrote:
> hi all,
> can anyone tell me why this distinction? i mean why it returns False
> on floats??
> >>> a = 1
> >>> b = 1
> >>> a is b
> True
> >>> a = 1.1
> >>> b = 1.1
> >>> a is b
> False
> >>>
>
> thanx .
> --
> cheers,
> Ishwor Gurung
In Python, so
Ishwor wrote:
hi all,
can anyone tell me why this distinction? i mean why it returns False
on floats??
a = 1
b = 1
a is b
True
a = 1.1
b = 1.1
a is b
False
thanx .
There is no guarantee that this will hold in all implementations of Python.
The majority implementation, usually called CPython becaus
hi all,
can anyone tell me why this distinction? i mean why it returns False
on floats??
>>> a = 1
>>> b = 1
>>> a is b
True
>>> a = 1.1
>>> b = 1.1
>>> a is b
False
>>>
thanx .
--
cheers,
Ishwor Gurung
--
http://mail.python.org/mailman/listinfo/python-list