[Python-3000] PEP 3119 - Introducing Abstract Base Classes
Jason Orendorff
jason.orendorff at gmail.com
Fri Apr 27 22:24:14 CEST 2007
On 4/26/07, Guido van Rossum <guido at python.org> wrote:
> - Where should PartiallyOrdered and TotallyOrdered live?
Could someone please post some sample code using either of
these? I don't see what they're good for.
Here's my failed attempt:
def my_max(a : TotallyOrdered, b : TotallyOrdered):
return a if a >= b else b
But this is both too loose (consider my_max(7, "spam"))
and too strict (consider my_max([1, 2], [2, 1])).
-j
More information about the Python-3000
mailing list