On Thu, Oct 13, 2011 at 11:08 AM, Yuval Greenfield email@example.com wrote:
+1 for refusing the temptation to guess.
Both equality definitions don't seem obvious or handy enough to be favorited by python. That is until some prevalent use cases are presented.
Ah, but the stricter equality definition (by start/stop/step) also refuses to guess! It doesn't consider range(0, 0) and range(1, 1) as equivalent because, indeed, it would have to guess. But it will consider range(1) == range(1) since everybody considers those equivalent so there's no guess-work involved. The identity-based __eq__ does nobody any good.