Ticket #12895 (needs_review enhancement)
Categories: adds support for SubcategoryMethods
|Reported by:||nthiery||Owned by:||nthiery|
|Cc:||sage-combinat, SimonKing||Work issues:|
|Authors:||Nicolas M. Thiéry||Merged in:|
With this patch, a category can implement a nested class SubcategoryMethods? that provides methods for all subcategories of this category (similar to ParentMethods? that provides methods for all parents of all subcategories of this category).
This is implemented by updating the class of each category C, at the end of its initialization, to insert C.subcategory_class as superclass (like what is done for Parents and Elements).
This is a bit tricky, since the super_categories method needs to be called during the initialization.
The patch is under finalization on http://combinat.sagemath.org/patches/