#11943: The category graph should comply with Python's method resolution order
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  nthiery                           
     
       Type:  enhancement  |         Status:  needs_work                        
     
   Priority:  major        |      Milestone:  sage-4.8                          
     
  Component:  categories   |       Keywords:  category graph, method resolution 
order
Work_issues:               |       Upstream:  N/A                               
     
   Reviewer:               |         Author:  Simon King                        
     
     Merged:               |   Dependencies:  #11900                            
     
---------------------------+------------------------------------------------
Changes (by nthiery):

  * milestone:  => sage-4.8


Comment:

 Replying to [comment:14 SimonKing]:
 > So, I suggest to use a lazy attribute `_set_of_super_categories`,
 providing the frozen set. It will be used in `is_subcategory`. Of course,
 the ''list'' of super categories should still be available, and its order
 should comply with Python's mro, according to the subject of this ticket.

 +1 (obviously :-)), though I kind of like better
 _all_super_categories_as_set to insist on the fact that it is very close
 to all_super_categories.

 > Since #11115 is merged into sage-4.7.3.alpha1, I wonder whether it is
 still necessary to have the list of all super categories as a lazy
 attribute, or whether a cached method is fast enough. I'll need some
 tests.

 +1 on getting rid of this lazy attribute, unless there is a very clearly
 defined use case where speed is essential.

 > However, I think it is a good idea to have a lazy attribute
 `_super_categories`. In that way, we have the speed even if the user does
 not use @cached_method when (s)he implements the method
 `super_categories()`.

 +1

 Cheers,
                                 Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11943#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to