Re: ZTK 2.0: Deprecate zope.sequencesort

Stephan Richter <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <2557935.pArhBCSWT2@einstein>
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  -  [email protected]
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 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.