On Mar 13, 9:56 pm, "Georg S. Weber" <georgswe...@googlemail.com>
wrote:
> Hi all,
>
> is there already an operator named %% (double-percent)?
> Somewhere in Python or its relatives?
>
> If not, we could have the best of both worlds. Just let act in Cython
> % as the corresponding C operator, i.e. -1 % 5 == -1 (to have maximal
> speed), and let in Cython %% act as the Python % operator, i.e. -1 %%
> 5 == 4 (to have maximal convenience).

It's interesting that this proposal has arisen three times
independently; on the Cython, NumPy and Sage lists :-)

One problem though is that you'd also need a corresponding operator
for truncating division (i.e. -7 // 6 == -2 in Python and -1 in C)...

Dag Sverre
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to