[Python-Dev] Re: (Don't Read If You're Busy With 2.1b2) "Rich" Comparisons?

Ka-Ping Yee ping@lfw.org
Fri, 23 Mar 2001 11:35:43 -0800 (PST)


On Fri, 23 Mar 2001, Moshe Zadka wrote:
> >>> a = set([1,2])
> >>> b = set([1,3])
[...]
> While I'd like
> 
> >>> max(a,b) == set([1,2,3])
> >>> min(a,b) == set([1])

The operation you're talking about isn't really max or min.

Why not simply write:

    >>> a | b
    [1, 2, 3]
    >>> a & b
    [1]

?


-- ?!ng