A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-March/013882.html below:

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

[Python-Dev] (Don't Read If You're Busy With 2.1b2) "Rich" Comparisons?Moshe Zadka moshez@zadka.site.co.il
Fri, 23 Mar 2001 21:08:22 +0200
Now that we have rich comparisons, I've suddenly realized they are
not rich enough. Consider a set type.

>>> a = set([1,2])
>>> b = set([1,3])
>>> a>b
0
>>> a<b
0
>>> max(a,b) == a
1

While I'd like

>>> max(a,b) == set([1,2,3])
>>> min(a,b) == set([1])

In current Python, there's no way to do it.
I'm still thinking about this. If it bothers anyone else, I'd
be happy to know about it.
-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez@debian.org  |http://www.{python,debian,gnu}.org



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4