I try to make a class derived from IntegerMod_abstract but simply calling the super().__init__ already fails.
I don't know where to start. See the example code. Even when i implement set_from_mpz
i get the same error.
from sage.rings.finite_rings.integer_mod import IntegerMod_abstract
class IntegerMod_centered(IntegerMod_abstract):
def __init__(self, parent, value):
super().__init__(parent, value)
R=Zmod(10)
IntegerMod_centered(R,5)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
NotImplementedError: must be defined in child class
Exception ignored in: 'sage.rings.finite_rings.integer_mod.IntegerMod_abstract.set_from_mpz'
Traceback (most recent call last):
File "<string>", line 5, in __init__
NotImplementedError: must be defined in child class
<repr(<__main__.IntegerMod_centered at 0x7f5caf4ad7c0>) failed: RecursionError: maximum recursion depth exceeded>