> > 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.FiniteDrinfeldModule" > which would be available to the end user. This "constructor class" would > take care of formatting the user input and would return a > "FiniteDrinfeldModule_rank_two" or a "FiniteDrinfeldModule_generic" > depending of the input. This would also give you the opportunity of giving > some liberty to the user when creating a Drinfeld module (via a list, an > additive polynomial, etc...) >
I am generally -1 on this. There can be specific reasons for doing this, most of those involve fairly complicated object creation at the cost of disassociating the construction from the actual object returned. The __classcall_private__() mechanism works well for this kind of dispatching with lots of examples within Sage for this. A quick general comment: The module should be a parent and vectors should be elements. Maps between them are elements of the Homset, which would be a parent. Best, Travis -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/cf9bba5f-be9d-4d68-a2ac-ad0fd41ddd3dn%40googlegroups.com.