#11768: Get source code for parent/element classes of categories
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  jason                
       Type:  enhancement  |         Status:  new                  
   Priority:  major        |      Milestone:  sage-5.0             
  Component:  misc         |       Keywords:  sources dynamic class
Work_issues:               |       Upstream:  N/A                  
   Reviewer:               |         Author:                       
     Merged:               |   Dependencies:                       
---------------------------+------------------------------------------------

Comment(by SimonKing):

 The patch works exactly as it is announced in the ticket description. One
 can now (on top of sage-4.7.2.alpha2) do:
 {{{
 sage: C = Rings()
 sage: from sage.misc.sageinspect import sage_getsource
 sage: print sage_getsource(C.parent_class)  #indirect doctest
 class ParentMethods:
     def is_field(self):
         raise NotImplementedError
 <BLANKLINE>
     def bracket(self, x, y):
 ...
 }}}

 Unfortunately,
 {{{
 sage: P = JackPolynomialsP(QQ); P.rename("JackP")
 sage: P.element_class??
 }}}
 does not work yet. So, the search for definitions should also include the
 `__base__` attribute of a class.

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