Skip to content

Commit e017444

Browse files
committed
alias the method weight
1 parent 104dde9 commit e017444

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sage/modular/quasimodform/element.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ def weight(self):
489489
r"""
490490
Return the weight of the given quasimodular form.
491491
492-
Note that the given form must be homogeneous.
492+
Note that the given form must be homogeneous. An alias of this method is
493+
``degree``.
493494
494495
EXAMPLES::
495496
@@ -500,6 +501,8 @@ def weight(self):
500501
6
501502
sage: QM(1/2).weight()
502503
0
504+
sage: (QM.0).degree()
505+
2
503506
sage: (QM.0 + QM.1).weight()
504507
Traceback (most recent call last):
505508
...
@@ -510,6 +513,8 @@ def weight(self):
510513
else:
511514
raise ValueError("the given graded quasiform is not an homogeneous element")
512515

516+
degree = weight # alias
517+
513518
def homogeneous_components(self):
514519
r"""
515520
Return a dictionary where the values are the homogeneous components of

0 commit comments

Comments
 (0)