#6854: Tab completion for elements of InfinitePolynomialRing
-----------------------------------+----------------------------------------
Reporter: ncohen | Owner: SimonKing
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.3
Component: commutative algebra | Keywords: tab completion,
InfinitePolynomialRing
Work_issues: | Author: Simon King
Upstream: N/A | Reviewer:
Merged: |
-----------------------------------+----------------------------------------
Comment(by SimonKing):
Hi!
Now I learned that the method {{{__members__}}} is used by {{{dir()}}}
It is a bit strange, since {{{dir?}}} explains that it would use a method
{{{__dir__}}} if it exists; but in fact it doesn't.
Anyway. With the new patch, one has both tab completion and introspection.
Note that according to the original post, {{{constant_coefficient}}},
which is inherited from the underlying polynomial, did not appear.
{{{
sage: R.<t>=InfinitePolynomialRing(QQ)
sage: p=t[1]+3*t[4]
sage: L=dir(p)
sage: [X for X in L if X.startswith('c')]
['category',
'change_ring',
'coefficient',
'coefficients',
'constant_coefficient',
'content']
}}}
And tab completion works as with the previous patch.
One concern though: How can one test tab completion? Note that the
{{{_getAttributeNames}}} and {{{__members__}}} methods have no doc test
yet. How should it best look?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6854#comment:7>
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.