Skip to content

Commit f9f0324

Browse files
author
Release Manager
committed
Trac #34872: AdditiveAbelianGroup_class.exponent() returns a Python int 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
2 parents 9cf6aa1 + 6d6e020 commit f9f0324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sage/groups/additive_abelian/additive_abelian_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def exponent(self):
352352
1
353353
"""
354354
if not self.invariants():
355-
return 1
355+
return ZZ(1)
356356
else:
357357
ann = self.annihilator().gen()
358358
if ann:

0 commit comments

Comments
 (0)