Hi Volker, On 2012-11-02, Volker Braun <vbraun.n...@gmail.com> wrote: > ------=_Part_681_27110033.1351894239886 > Content-Type: text/plain; charset=ISO-8859-1 > > Is there any Parent that has generators in Sage?
Yes, all have. That's to say, sage.structure.parent.Parent provides the infrastructure for generators. Just look at the __init__ arguments: def __init__(self, base=None, *, category=None, element_constructor=None, gens=None, names=None, normalize=True, facade=None, **kwds): No, they don't have. There is Parent._populate_generators_ defined in sage.structure.category_object.CategoryObject, which sets self._generators, but self._generators doesn't really seem to be used. > Also, the gens() method is commented out in category_object.pxd. How are > you supposed to define the generators? Manually implement a gens() method? I am surprised. If there is a method _populate_generators_ for a class, there should be a default way to retrieve the generators. But apparently one currently has to implement one's own gen/gens/ngens method, or inherit from sage.structure.parent_gens (which is done in sage.structure.rings.Ring, for example). Cheers, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe from this group, send email to sage-devel+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en.