Opened 12 years ago
Closed 12 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: | 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 12 years ago by
comment:1 Changed 12 years ago by
- Milestone set to sage-4.1.2
comment:2 Changed 12 years ago by
- Reviewers set to Mike Hansen
- Summary changed from [with patch, needs review] "Definition:" messed up in notebook and command line in cython code to [with patch, positive review] "Definition:" messed up in notebook and command line in cython code
Looks good to me.
comment:3 Changed 12 years ago by
- Merged in set to Sage 4.1.2.alpha2
- Resolution set to fixed
- Status changed from new to closed
depends on patch at #5726