On Thursday, February 28, 2013 11:32:26 AM Tres Seaver wrote:
> > Thoughts?
> 
> I'm generally in favor of shrinking the ZTK, but just for discussion's
> sake:  emulating 'cmp' for objects which have rich comparison semantics
> isn't that difficult::
> 
>   def _faux_cmp(lhs, rhs):
>       return int(rhs < lhs) - int(lhs < rhs)

Well, that is the obvious implementation of cmp(), but that's not the point of 
the package. The package provides a callable class that represents a cmp() 
function. The problem is that it is not just creating some keys and calls 
cmp() on it. I could not find out a way to create a single key.

I guess the right way to port the package is to implement a sort API.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to