Re: ZTK 2.0: Deprecate zope.sequencesort

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/28/2013 08:43 AM, Stephan Richter wrote:
> Hi everyone,
> 
> I would like to deprecate zope.sequencesort in ZTK 2.0, since it
> cannot properly ported to Python 3, since it depends heavily on the
> cmp() way of sorting. I am also not a user of the package and I only
> tried to port the package for completeness sake.
> 
> 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)


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          [email protected]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlEvhpoACgkQ+gerLs4ltQ54KACggufMQUYdhD1Y9pefcP0qvAEE
oEMAoLwcOL9/gGtdsIUJ0YlMme85WGhZ
=ayRa
-----END PGP SIGNATURE-----

_______________________________________________
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.