[Python-3000] PEP 3119 - Introducing Abstract Base Classes (original) (raw)
Jason Orendorff jason.orendorff at gmail.com
Fri Apr 27 22:24:14 CEST 2007
- Previous message: [Python-3000] PEP 3119 - Introducing Abstract Base Classes
- Next message: [Python-3000] PEP 3119 - Introducing Abstract Base Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] PEP 3119 - Introducing Abstract Base Classes
- Next message: [Python-3000] PEP 3119 - Introducing Abstract Base Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]