Ticket #1267 (closed defect: fixed)
[with patch] documentation for piecewise does not show up in notebook
| Reported by: | cwitty | Owned by: | mhansen |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.9 |
| Component: | notebook | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
In the public notebook (on www.sagenb.org), when I evaluate a cell with piecewise?, I get this:
File: /usr/local/sage-2.6/local/lib/python2.5/site-packages/sage/functions/piecewise.py Type: <type 'classobj'> Definition: piecewise(x0) Docstring:
with no actual docstring. (Doing the same thing from the command line does give a useful docstring.)
Attachments
Change History
comment:1 Changed 6 years ago by mabshoff
- Summary changed from documentation for piecewise does not show up in notebook to documentation for piecewise does not work
- Milestone changed from sage-2.9 to sage-2.8.15
comment:2 Changed 6 years ago by mabshoff
- Summary changed from documentation for piecewise does not work to documentation for piecewise does not show up in notebook
After some testing it turns out that cwitty is right and it does work in console mode with 2.8.14 So was is wrong and change it back.
comment:3 Changed 6 years ago by was
I can confirm and replicate this problem:
[10:09am] was_: It does fail on my ocally-running notebook. [10:09am] was_: Ipython does the help on the command line. [10:09am] was_: *I* wrote what does the help in the notebook. [10:09am] DenisG_: (my locally running notebook) [10:09am] was_: It's separate code; I think it is is sage/server/support.py or something like that [10:10am] was_: And there is definitely a bug.
comment:4 Changed 6 years ago by mhansen
- Owner changed from boothby to mhansen
- Status changed from new to assigned
- Summary changed from documentation for piecewise does not show up in notebook to [with patch] documentation for piecewise does not show up in notebook
Actually, I don't think anything wrong with the ? or ?? notation. What was happening was roughly the following:
class PiecewisePolynomial:
def __init__(self, list_of_pairs):
"""docstring"""
...
piecewise = PiecewisePolynomial
The result of piecewise? was correct since PiecewisePolynomial? didn't have a class docstring.
Note: See
TracTickets for help on using
tickets.

