Why keep identity-based equality comparison?

Antoon Pardon apardon at forel.vub.ac.be
Wed Jan 11 10:13:36 EST 2006


Op 2006-01-11, Mike Meyer schreef <mwm at mired.org>:
> Antoon Pardon <apardon at forel.vub.ac.be> writes:
>> Op 2006-01-10, Mike Meyer schreef <mwm at mired.org>:
>>>> Now you can take the practical option and decide that programmatically
>>>> it make no sense to compare a specific couple of values and throw an
>>>> exception in this case, but it doesn't matter much which test you are
>>>> conducting at that point.
>>> Can you provide a case where having a test for equality throw an
>>> exception is actually useful?
>> I'm not going to bother with that.
>
> Since you're being vague about what you want,

I would like some consistency. Either all comparisons between objects
of different types throw an exception by default or none does.

> and won't provide
> examples to show why you want things to behave whatever way you want,
> I can't really say much else about it.

Did you see examples that show why Guido wants things to behave whatever
way he wants? I didn't and I didn't see examples from you either.

Guido's idea is a change from current behaviour. Each time I saw some
argue a change here, people seem to expect a use case from that person.
So why ask a use case of me and just accepy Guido's idea.

-- 
Antoon Pardon



More information about the Python-list mailing list