[Zope-dev] ZTK 2.0: Deprecate zope.sequencesort
Stephan Richter
stephan.richter at gmail.com
Thu Feb 28 18:04:07 UTC 2013
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"
More information about the Zope-Dev
mailing list