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

Comment(by SimonKing):

 Concerning lazy attributes: I wonder whether one could add a method
 `rename(name)` to a lazy attribute. That method would return a copy of the
 original lazy attribute, but with a new name.

 Then, the example above would become
 {{{
 sage: class Foo(object):
 ....:     @lazy_attribute
 ....:     def _bar(self):
 ....:         return 5
 ....:     bar = _bar.rename("bar")
 ....:
 sage: f = Foo
 sage: f.bar.__name__
 'bar'
 }}}

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