finding object using IS instead of ==

Michael Hudson mwh at python.net
Thu Aug 28 13:29:15 EDT 2003


"Mark Hahn" <mark at hahnca.com> writes:

> If I have a large collection (list, tuple, or dict) of objects, can
> I locate one quickly that matches a given object using the IS
> equivalence operator instead of the value == operator?

I don't think so.  You'll have to roll your own code.

Cheers,
mwh

-- 
  One of the great skills in using any language is knowing what not
  to use, what not to say.  ... There's that simplicity thing again.
                                                       -- Ron Jeffries




More information about the Python-list mailing list