Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

> - I find the _cmp() and __cmp() indirection poor style in 3.x,
> especially when you simply end up comparing self._getstate() and
> other._getstate() (it is also suboptimal because it can do more
> comparisons than needed)

The best I could come up with is issue7989-cmp.diff - basically replacing 
_cmp(self, other) with _normalize(self, other) that returns a pair of objects 
that compare the same as self and other.

I am not committing this in sandbox because I don't see this a big improvement.

Datetime comparisons are tricky due to date/datetime inheritance.  I think it 
is best not to touch it.

----------
Added file: http://bugs.python.org/file17842/issue7989-cmp.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7989>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to