Given an AbelianGroup with infinite order generators the __iter__ method silently returns an empty iterator.
sage: for a in AbelianGroup(1,[0]):
....: print(a)
gives no output.
Either an error should be raised (like for the list method), or ideally an iterator over all elements (by lexicographic order of the powers of generators should be returned, as for
sage: for a in ZZ:
....: print(a)
....: if a^2 + a == 30:
....: break
Given an AbelianGroup with infinite order generators the
__iter__
method silently returns an empty iterator.gives no output.
Either an error should be raised (like for the list method), or ideally an iterator over all elements (by lexicographic order of the powers of generators should be returned, as for
Component: group theory
Issue created by migration from https://trac.sagemath.org/ticket/30751