#9976: Decorated functions/methods have generic signature in documentation
--------------------------------+-------------------------------------------
Reporter: jsrn | Owner: mvngu
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: documentation | Keywords: sphinx, documentation, cython
inspection
Author: jsrn, Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by jsrn):
> I think I got it: One import `ArgSpec` from `inspect`, does not change
the expected output of `_sage_argspec_` (it should still be a tuple, for
backwards compatibility), and `sage_argspec` returns
`ArgSpec(*obj._sage_argspec_())`.
Do you mean sageinspect.sage_getargspec should return an ArgSpec, while
_sage_argspec_ on objects should always return an unnamed tuple? I'm
trying to use _sage_argspec_ instead of the _sage_getargspec I invented,
but then in order to use sage_getargspec (as an alternative to the
recursive getter-thingie I have now), I would have to unwrap the ArgSpec
into a normal tuple? That would be clumsy and tedious.
Alternatively, we could let both _sage_argspec_ and
sageinspect.sage_getargspec use ArgSpec named tuples everywhere; named
tuples exhibit the exact (I think) same behaviour as tuples, whenever one
is ignorant that they are named tuples (for example, it returns true on
isinstance(*, tuple)). Therefore, I would think no code would break by
changing this, and it would be nicer and less clumsy.
Btw, is there a chat-room or IRC channel recommended for this kind of
communication? This is getting a bit old :-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:47>
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.