diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-03-02 00:19:49 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-03-02 00:19:49 +0000 |
commit | 44f14b039949005ecc93fd8294933c84fab6f374 (patch) | |
tree | e68c8735baa42a015f34cd37c2d3c89020f8ee97 /Python/strdup.c | |
parent | 3ba491e6b1747707374e56fd9f0fb958b2aafcd5 (diff) | |
download | cpython-git-44f14b039949005ecc93fd8294933c84fab6f374.tar.gz |
SF bug 693121: Set == non-Set is a TypeError.
Allow mixed-type __eq__ and __ne__ for Set objects. This is messier than
I'd like because Set *also* implements __cmp__. I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent). The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.
Diffstat (limited to 'Python/strdup.c')
0 files changed, 0 insertions, 0 deletions