[Python-ideas] integer dividion in R -- PS

Mark Dickinson dickinsm at gmail.com
Fri May 7 12:34:22 CEST 2010


On Fri, May 7, 2010 at 10:50 AM, Xavier Ho <contact at xavierho.com> wrote:
> On Fri, May 7, 2010 at 7:43 PM, Mark Dickinson <dickinsm at gmail.com> wrote:
>>        e = e >= 0 ? e % _PyHASH_BITS : _PyHASH_BITS-1-((-1-e) % _PyHASH_BITS);
>
> Wow. I would never write code like that, but you got a fair point.

Yes, sorry.  I didn't claim it was *good* code.  :)  It would probably
be better expressed as a macro, or as a function with the expectation
that the compiler would inline it.

Mark



More information about the Python-ideas mailing list