Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I make a python function return a polynomial?

I have a file ~/

from sage.all import *

def my_func(n):
    f(t) = t**n 
    return f(t)

But issuing sage: import foo raises the error SyntaxError: can't assign to function call

What am I doing wrong?