#11935: Make parent/element classes independent of base rings
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  nthiery                           
   
       Type:  enhancement  |         Status:  needs_review                      
   
   Priority:  major        |      Milestone:  sage-4.8                          
   
  Component:  categories   |       Keywords:  parent class, element class, 
category
Work_issues:               |       Upstream:  N/A                               
   
   Reviewer:               |         Author:  Simon King                        
   
     Merged:               |   Dependencies:  #9138 #11900 #11943 #11999        
   
---------------------------+------------------------------------------------

Comment(by nthiery):

 Replying to [comment:31 SimonKing]:
 > You mean: Add an optional argument "name" to the lazy attribute? I was
 thinking about that, too.

 Yup.

 > Using it means that (in the example above) `f._bar` would result in
 assigning `f.__dict__["bar"] = 5` (note: "bar", not "_bar", even though
 the lazy attribute is called requested as "_bar").

 Hmm, this smells indeed. I am not sure. At this point, I am wondering
 if we don't want instead to introduce a new subclass:

 {{{
     class CategoryWithClassesFromBases(Category):  # TODO: find a better
 name
 }}}

 with the two optimized parent_class / element_class (and possibly in
 the future morphism_class / category_class), and have:

 {{{
     class Category_over_base_ring(CategoryWithClassesFromBases): ...
     class JoinCategory(CategoryWithClassesFromBases): ...
 }}}

 Sorry, I should have though about this option earlier ...

 Cheers,
                                 Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11935#comment:32>
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