Re: [PATCH nft v9]tests: py: fix pyhton3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 20, 2019 at 8:07 PM Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
>
> On Wed, Jun 19, 2019 at 11:27:41PM +0530, Shekhar Sharma wrote:
> > This patch changes the file to run on both python2 and python3.
> >
> > The tempfile module has been imported and used.
> > Although the previous replacement of cmp() by eric works,
> > I have replaced cmp(a,b) by ((a>b)-(a<b)) which works correctly.
>
> Any reason not to use Eric's approach? This ((a>b)-(a<b)) is
> confusing.

No, Eric's approach is also working nicely. I read on a website
that cmp(a,b) of python2 can be replaced by ((a>b)-(a<b)) in python3.

> > Thanks!
>
> BTW, strictly place your patch description here.
>
> Things like "Thanks!" to someone specifically and the cmp()
> explanation should go below the --- marker, like versioning.
>
OK. Will take care of that in the future.

> BTW, Cc Eric Garver in your patches, he's helping us with reviewing :-)
Sure :-)

Shekhar



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux