Dan Bishop wrote:

> def cmp_key(cmp_fn):

>     class CmpWrapper(object):

>         def __init__(self, obj):

>             self.obj = obj

>         def __cmp__(self, other):

>             return cmp_fn(self.obj, other.obj)

>     return CmpWrapper



Apparently I'm overlooking something obvious ...

how is this supposed to work if __cmp__ is no longer

being called?  (Which was my understanding.)



Thank you,

Alan Isaac




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to