Skip to content

Commit

Permalink
Changed documentation for __getitem__ to what was suggested by Dave M…
Browse files Browse the repository at this point in the history
…orris.
  • Loading branch information
Noel Roemmele committed Feb 11, 2025
1 parent 97cb9fb commit feaf7ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sage/rings/multi_power_series_ring_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,11 @@ def _im_gens_(self, codomain, im_gens, base_map=None):

def __getitem__(self, n):
"""
If ``n`` is a tuple returns the coefficient for a term where each
element of the tuple corresponds to a degree of a varaible. If ``n``
is an integer returns summand of total degree ``n``.
Return the coefficient of the monomial ``x1^e1 * x2^e2 * ... * xk^ek``
if ``n = (e_1, e2, ..., ek)`` is a tuple whose length is the number of
variables ``x1,x2,...,xk`` in the power series ring.
Return the sum of the monomials of degree ``n`` if ``n`` is an integer.
TESTS::
Expand Down

0 comments on commit feaf7ff

Please sign in to comment.