[Python-Dev] Keep default comparisons - or add a second set?

Adam Olsen rhamph at gmail.com
Wed Dec 28 16:27:10 CET 2005


On 12/28/05, Noam Raphael <noamraph at gmail.com> wrote:
> On 12/28/05, Adam Olsen <rhamph at gmail.com> wrote:
> > Speaking of id, there's no reason why "id(a) == id(b)" has to fail for
> > mismatched types in the face of persistence so long as the result of
> > id() has the same lifetime as the target object.  This could be done
> > using weakrefs or by making an id type with a strong reference to the
> > target object.
>
> I don't mean to change the current behaviour of id() - I just meant
> that an additional one may be implemented, possible by a specific
> library (Zope, for instance), so the built-in one shouldn't be used as
> a fallback default.

Why aim low when you can aim for the face instead? :)

--
Adam Olsen, aka Rhamphoryncus


More information about the Python-Dev mailing list