A Universe Set
Jorgen Grahn
grahn+nntp at snipabacken.dyndns.org
Tue Oct 17 04:56:59 EDT 2006
On Mon, 16 Oct 2006 09:21:11 -0500, skip at pobox.com <skip at pobox.com> wrote:
>
[me]
> >> - the wildcard object, which compares equal to everything else
>
[Paul]
> Paul> class MatchAny(object):
> Paul> def __cmp__(self,other):
> Paul> return 0
>
> Paul> wild = MatchAny()
FWIW, I define __eq__ in the one I (infrequently) use.
> ...
>
> You're at the mercy of the comparison machinery implemented by individual
> classes. Executing this script (using any of Python 2.3 through what's
> currently in the SVN repository):
...
Oh. /Is/ there a way of making it work, then? If we ignore the problems
with having such objects in the first place, that is.
/Jorgen
--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
More information about the Python-list
mailing list