[issue1717] Get rid of more refercenes to __cmp__

Marc-Andre Lemburg report at bugs.python.org
Tue Dec 9 17:45:28 CET 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 2008-12-09 16:06, Antoine Pitrou wrote:
> Antoine Pitrou <pitrou at free.fr> added the comment:
> 
>> The idea was to have one implementation of the work-around (a>b) - (b<a)
>> instead of 10 or so instances of this snippet in the Python stdlib
>> and probably a few hundred places in other code.
> 
> But what use-case does it solve, except for making legacy code easier to
> port to Py3k?

It implements the DRY principle.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1717>
_______________________________________


More information about the Python-bugs-list mailing list