On 5/03/2014 3:47 PM, Rustom Mody wrote:
That python is a hll means that machine reprs are intended to be abstracted
away. 'is' fails to do that -- proof of that being the discrepancy between
is and ==

The "discrepancy" is because _they're fundamentally different_:

    >>> a = b = [1,2]
    >>> c = [1,2]
    >>> a is b
    True
    >>> a is c
    False
    >>> a == b
    True
    >>> a == c
    True

`is` is used to determine if two names refer to the same object.
`==` is used to determine if they're equivalent in value.

Both have their uses.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to