#11768: Get source code for parent/element classes of categories
---------------------------+------------------------------------------------
Reporter: SimonKing | Owner: jason
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: misc | Keywords: sources dynamic class
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies:
---------------------------+------------------------------------------------
Changes (by newvalueoldvalue):
* status: new => needs_review
* author: => Simon King
Comment:
It seems to me that things are fine now.
In particular, we have
{{{
sage: C = Rings()
sage: C.parent_class??
Type: DynamicMetaclass
Base Class: <class 'sage.structure.dynamic_class.DynamicMetaclass'>
String Form: <class 'sage.categories.rings.Rings.parent_class'>
Namespace: Interactive
File: /mnt/local/king/SAGE/sage-4.7.2.alpha1/local/lib/python2.6
/site-packages/sage/categories/rings.py
Source:
class ParentMethods:
def is_field(self):
raise NotImplementedError
def bracket(self, x, y):
...
sage: P = JackPolynomialsP(QQ)
sage: P.element_class??
Type: DynamicMetaclass
Base Class: <class 'sage.structure.dynamic_class.DynamicMetaclass'>
String Form: <class
'sage.combinat.sf.jack.JackPolynomials_p_with_category.element_class'>
Namespace: Interactive
File: /mnt/local/king/SAGE/sage-4.7.2.alpha1/local/lib/python2.6
/site-packages/sage/combinat/sf/jack.py
Definition: P.element_class(self, x, include=None, exclude=None)
Source:
class
SymmetricFunctionAlgebra_generic_Element(CombinatorialFreeModule.Element):
def __repr__(self):
"""
EXAMPLES::
sage: m = SFAMonomial(QQ)
...
sage: P.<x,y> = QQ[]
sage: I = P*[x,y]
sage: I??
Type: MPolynomialIdeal
Base Class: <class
'sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal'>
String Form: Ideal (x, y) of Multivariate Polynomial Ring in x, y over
Rational Field
Namespace: Interactive
File: /mnt/local/king/SAGE/sage-4.7.2.alpha1/local/lib/python2.6
/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py
Source:
class MPolynomialIdeal( MPolynomialIdeal_singular_repr, \
MPolynomialIdeal_macaulay2_repr, \
MPolynomialIdeal_magma_repr, \
Ideal_generic ):
def __init__(self, ring, gens, coerce=True):
r"""
Create an ideal in a multivariate polynomial ring.
...
}}}
All three examples are doctested (via `sage_getsourcelines`). So, ready
for review!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11768#comment:2>
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.