#13969: "self" sometimes gets substituted in class docstrings
---------------------------+------------------------------------------------
Reporter: cnassau | Owner: jason
Type: defect | Status: new
Priority: major | Milestone: sage-5.7
Component: misc | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------+------------------------------------------------
Comment (by cnassau):
> By the way, this is not notebook-specific: from the command line,
execute "ed" to open an editor. Paste your example into it, save and quit.
Then do `Test?`
Somehow I cannot reproduce this from the command line, neither directly
nor using a temporary file via "ed". But the line that you pointed out
definitely seems to be the culprit.
I managed to find an example of this problem "in the wild": if you ask for
{{{CombinatorialFreeModule.__init__?}}} in a notebook cell you get
(somewhere in the middle)
{{{#!python
sage: class MyAlgebra(CombinatorialFreeModule):
... def _repr_(self):
... return "MyAlgebra on
%s"%(CombinatorialFreeModule.basis().keys())
... def product_on_basis(self,i,j):
... pass
}}}
Here "{{{CombinatorialFreeModule.basis().keys()}}}" should really be
"{{{self.basis().keys()}}}".
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13969#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.