Skip to content

Commit

Permalink
Trac #34872: AdditiveAbelianGroup_class.exponent() returns a Python i…
Browse files Browse the repository at this point in the history
…nt for the trivial group

{{{#!sage
sage: type(AdditiveAbelianGroup([]).exponent())
<class 'int'>
}}}

URL: https://trac.sagemath.org/34872
Reported by: lorenz
Ticket author(s): Lorenz Panny
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Feb 11, 2023
2 parents 9cf6aa1 + 6d6e020 commit f9f0324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/groups/additive_abelian/additive_abelian_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def exponent(self):
1
"""
if not self.invariants():
return 1
return ZZ(1)
else:
ann = self.annihilator().gen()
if ann:
Expand Down

0 comments on commit f9f0324

Please sign in to comment.