Re: [sage-devel] Question about factories, representations and multiple classes

2022-06-07 Thread 'Travis Scrimshaw' via sage-devel
> > I'm also relatively new to Sage development, but one thing I can think of > is that you could create a constructor module for your implementation of > Drinfeld module. In short, the way I see it is that you would have a new > module named "constructor" with a class "constructor.FiniteDrinfe

Re: [sage-devel] Question about factories, representations and multiple classes

2022-06-07 Thread davida...@gmail.com
Hello Antoine, I'm also relatively new to Sage development, but one thing I can think of is that you could create a constructor module for your implementation of Drinfeld module. In short, the way I see it is that you would have a new module named "constructor" with a class "constructor.FiniteD

Re: [sage-devel] Question about factories, representations and multiple classes

2022-06-07 Thread John H Palmieri
Isn't this because you're using CachedRepresentation? From the documentation : Instances of a class have a *cached representation behavior* when several instances constructed with the same arguments s

Re: [sage-devel] Question about factories, representations and multiple classes

2022-06-07 Thread Antoine Leudière
I thank all of you for your answers. And sorry for taking a bit long to reply! After many trys and errors, here is something that works for me: ``` from sage.structure.sage_object import SageObject from sage.structure.unique_representation import CachedRepresentation class MyInteger(CachedRepre