Re: [ovs-dev] [PATCH 10/11] python: Fix object comparisons in Python 3.

2016-02-02 Thread Russell Bryant
On 02/02/2016 04:22 PM, Ben Pfaff wrote: > On Fri, Jan 22, 2016 at 09:32:32PM -0500, Russell Bryant wrote: >> Python 3 no longer supports __cmp__. Instead, we have to implement the >> "rich comparison" operators. We implement __eq__ and __lt__ and use >> functools.total_ordering to implement the

Re: [ovs-dev] [PATCH 10/11] python: Fix object comparisons in Python 3.

2016-02-02 Thread Ben Pfaff
On Fri, Jan 22, 2016 at 09:32:32PM -0500, Russell Bryant wrote: > Python 3 no longer supports __cmp__. Instead, we have to implement the > "rich comparison" operators. We implement __eq__ and __lt__ and use > functools.total_ordering to implement the rest. > > In one case, no __cmp__ method was

[ovs-dev] [PATCH 10/11] python: Fix object comparisons in Python 3.

2016-01-22 Thread Russell Bryant
Python 3 no longer supports __cmp__. Instead, we have to implement the "rich comparison" operators. We implement __eq__ and __lt__ and use functools.total_ordering to implement the rest. In one case, no __cmp__ method was provided and instead relied on the default behavior provided in Python 2.