#17847: Cython: embed signatures in docstrings of Sage library code
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.6
Component: cython | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer, | Reviewers: Simon King
Simon King | Work issues:
Report Upstream: Fixed upstream, | Commit:
but not in a stable release. | 21ecfada11dda015de204cb92c27916e561c726a
Branch: | Stopgaps:
u/jdemeyer/ticket/17847 |
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
The make doc error says:
{{{
OSError: [polynomia] docstring of
sage.rings.polynomial.laurent_polynomial.LaurentPolynomial_mpair.derivative:1:
WARNING: Inline emphasis start-string without end-string.
}}}
The doc string is:
{{{
sage: print
sage.rings.polynomial.laurent_polynomial.LaurentPolynomial_mpair.derivative.__doc__
LaurentPolynomial_mpair.derivative(self, *args)
File: sage/rings/polynomial/laurent_polynomial.pyx (starting at line 2283)
The formal derivative of this Laurent polynomial, with respect
to variables supplied in args.
Multiple variables and iteration counts may be supplied; see
documentation for the global derivative() function for more
details.
.. seealso::
:meth:`_derivative`
EXAMPLES::
sage: R = LaurentPolynomialRing(ZZ,'x, y')
sage: x, y = R.gens()
sage: t = x**4*y+x*y+y+x**(-1)+y**(-3)
sage: t.derivative(x, x)
12*x^2*y + 2*x^-3
sage: t.derivative(y, 2)
12*y^-5
}}}
`*args` would be interpreted as an emphasis to the text of the docstring,
which indeed isn't ended by another `*`.
But isn't sage_getdoc called for creating the docs? It ''does'' strip the
embedded information!
{{{
sage: print
sage.misc.sageinspect.sage_getdoc(sage.rings.polynomial.laurent_polynomial.LaurentPolynomial_mpair.derivative)
The formal derivative of this Laurent polynomial, with respect to
variables supplied in args.
Multiple variables and iteration counts may be supplied; see
documentation for the global derivative() function for more
details.
See also: "_derivative()"
EXAMPLES:
sage: R = LaurentPolynomialRing(ZZ,'x, y')
sage: x, y = R.gens()
sage: t = x**4*y+x*y+y+x**(-1)+y**(-3)
sage: t.derivative(x, x)
12*x^2*y + 2*x^-3
sage: t.derivative(y, 2)
12*y^-5
}}}
Or is `_sage_getdoc_unformatted` used to build the docs?
--
Ticket URL: <http://trac.sagemath.org/ticket/17847#comment:46>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.