Consider the following innocent definition:
def bug():
"""
sage: c = bug()
sage: c.coefficients_mononomials()
"""
R.<x1, x2, x3> = QQ[]
p = 20*x1^2 + 20*x1*x2 + 20*x2^2 + 20*x1*x3 + 20*x2*x3 + 20*x3^2
return Sequence([p])
If I store this in a file "bug.sage" I can do:
sage: load('/home/martin/bug.sage')
sage: c = bug()
sage: c.coefficients_mononomials()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
...
However, if I use tab-completion in the last line (i.e., to get `coefficients_monomials`), it is found and I obtain the correct result.
Why? How can I debug this?
Martin