On 4/10/2014 1:03 AM, Kim Plofker wrote:
Thanks, the % operator is indeed what I want, but I want to use it with
a function expression rather than with numbers alone.  And that seems to
create a type error.

Here's an example of what goes wrong:

t = var('t')
L(t) = t*725.5%360.0

This produces the following error message:

...
TypeError: unsupported operand type(s) for %:
'sage.symbolic.expression.Expression' and
'sage.symbolic.expression.Expression'


I can use other arithmetic operators such as + and / in this function
expression, but not %, and I don't understand why.  Is it indeed a
Sage-specific problem rather than something I could work around in Python?

It seems that someone either forgot to implement % or decided not too. You will have to ask the sage people.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to