Hey John,
   I think in this case you want ElementMethods because your putting this 
in the category of endomorphism, whose elements are the morphisms. The next 
thing I think of is MorphismMethods, but that would apply to all morphisms 
IIRC.

Best,
Travis


On Thursday, July 28, 2016 at 4:17:15 PM UTC-5, John H Palmieri wrote:
>
> When defining a category in Sage, is there any way to define 
> "HomsetMethods" for that category? For example, if I want to have certain 
> morphisms only defined when in an endomorphism set (so tab completion is 
> less misleading), I would like to do:
>
> class MyCategory(Category_singleton):
>     blah
>
>     class Endset(CategoryWithAxiom):
>         class HomsetMethods:
>             def some_map(self):
>                  """
>                  This is a map which should only exist in a set of 
> endomorphisms.
>                  """
>
> Is this possible?
>
> -- 
> John
>
>

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to