Opened 13 years ago
Closed 13 years ago
#6848 closed defect (fixed)
[with patch, positive review] "Definition:" messed up in notebook and command line in cython code
Reported by: | jhpalmieri | Owned by: | jhpalmieri |
---|---|---|---|
Priority: | major | Milestone: | sage-4.1.2 |
Component: | misc | Keywords: | |
Cc: | Merged in: | Sage 4.1.2.alpha2 | |
Authors: | John Palmieri | Reviewers: | Mike Hansen |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Quoted from #5726:
sage: RDF.random_element? ... Definition: RDF.random_element(min='-1', max='1')
Notice the stupid quotes around -1 and 1, which are very confusing!
Also, from the command line, if you type RDF.random_element?
, you don't see a "Definition" line at all. This patch fixes both issues: the first by using eval(argument)
, as suggested by timdumol at #5726, and the second by setting
IPython.OInspect.getargspec = sageinspect.sage_getargspec
in sage.misc.interpreter. Note that sage_getargspec
is a modified version of getargspec
to start with, so this modification should work in general. (It was already in use, essentially, in the notebook -- introspection in the notebook calls sage_getdef
, which in turn calls sage_getargspec
. See the function docstring
in sage.server.support
.)
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | trac_6848-defn.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | → sage-4.1.2 |
---|
comment:2 Changed 13 years ago by
Reviewers: | → Mike Hansen |
---|---|
Summary: | [with patch, needs review] "Definition:" messed up in notebook and command line in cython code → [with patch, positive review] "Definition:" messed up in notebook and command line in cython code |
Looks good to me.
comment:3 Changed 13 years ago by
Merged in: | → Sage 4.1.2.alpha2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
depends on patch at #5726