conventions/requirements for 'is' vs '==', 'not vs '!=', etc

Asun Friere afriere at yahoo.co.uk
Mon May 19 22:59:45 EDT 2008


On May 20, 6:58 am, "bruno.desthuilli... at gmail.com"
<bruno.desthuilli... at gmail.com> wrote:
> On 19 mai, 22:29, Luis Zarrabeitia <ky... at uh.cu> wrote:
> (snip)
>
> > The main
> > concept here: identity [usually] implies equality,
>
> I really enjoyed the "usually" disclaimer !-)

Well you have to be careful in case some smartarse comes back with a
class with something like this in it:

def __eq__ (self, other) :
    if self is other : return False

%)



More information about the Python-list mailing list