#11267: cdef public attributes of a class should only appear in the docs if they
have a proper docstring
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: mvngu
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.7.1
Component: documentation | Keywords: cdef public attribute
documentation
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by newvalueoldvalue):
* status: new => needs_review
* author: => Simon King
Old description:
> This ticket seems related with #9976, so, I put the participants from
> there as Cc.
>
> Assume that a cdefined class, such as
> `sage.modular.modsym.heilbronn.HeilbronnCremona`, has a `cdef public`
> attribute, such as `p`. Then, this attribute appears in the docs, even
> though it is not a method and has no docstring:
> {{{
> sage: print sage.modular.modsym.heilbronn.HeilbronnCremona.p.__doc__
> None
> }}}
>
> Without #9976, the documentation looks like
> [http://www.sagemath.org/doc/reference/sage/modular/modsym/heilbronn.html#sage.modular.modsym.heilbronn.HeilbronnCremona.p
> here]: The attribute p is mentioned without documentation.
>
> With #9976, a generic docstring is shown, which is not very informative:
> {{{
> x.__init__(...) initializes x; see x.__class__.__doc__ for signature
> }}}
>
> I suggest to change sage_autodoc.py so that a cdef public attribute is
> only shown if it has a doc string.
New description:
This ticket seems related with #9976, so, I put the participants from
there as Cc.
Assume that a cdefined class, such as
`sage.modular.modsym.heilbronn.HeilbronnCremona`, has a `cdef public`
attribute, such as `p`. Then, this attribute appears in the docs, even
though it is not a method and has no docstring:
{{{
sage: print sage.modular.modsym.heilbronn.HeilbronnCremona.p.__doc__
None
}}}
Without #9976, the documentation looks like
[http://www.sagemath.org/doc/reference/sage/modular/modsym/heilbronn.html#sage.modular.modsym.heilbronn.HeilbronnCremona.p
here]: The attribute p is mentioned without documentation.
With #9976, a generic docstring is shown, which is not very informative:
{{{
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
}}}
I suggest to change sage_autodoc.py so that a cdef public attribute is
only shown if it has a doc string.
Depends on #9976
--
Comment:
The patch seems to solve the problem.
Depends on #9976
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11267#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.