Doc(Core): Add docstring for monomials in MOPolynomial

This commit is contained in:
Bertrand Benjamin 2018-11-23 11:53:10 +01:00
parent 2176cc65df
commit c8be5c1414

View File

@ -79,6 +79,15 @@ class MOpolynomial(MO):
@property
def monomials(self):
""" Return dictionnary with degree in keys and monomial in value
:example:
>>> p = MOpolynomial('x', [1, 2, 3])
>>> p.monomials
{<MOnumber 0>: <MOnumber 1>, <MOnumber 1>: <MOMonomial 2x>, <MOnumber 2>: <MOMonomial 3x^2>}
>>> p.monomials.values()
dict_values([<MOnumber 1>, <MOMonomial 2x>, <MOMonomial 3x^2>])
"""
return self._monomials