Closed williamstein closed 17 years ago
From Alec C:
Looking over the SAGE reference manual I found some crazy stuff in section
8.1 2D Plotting
* show*( self, [xmin=False], [xmax=None], [ymin=True], [ymax=125 ], [
figsize=None], [filename=[5, 4]], [dpi=None], [ axes=None], [axes_label=None
], [frame=None])
look at figsize, etc. some other functions have the same problem, any
ideas?
This has been reported before. It must be a bug in update, i.e,. that file
in <SAGE_ROOT>/devel/sage/sage/ref that I showed you. We have to fix this.
Another example from Ifti {{{> [2] There seems to be some strange function declaration mangling which
seems to be going on in the manual.
For example the function Lseries_dokchitser in the manual
reads
Lseries_dokchitser(self, [prec=gp], [max_imaginary_part=40], [max_asymp_coeffs=0], [algorithm=53])
whereas the source code and E.Lseries_dokchitser? help reads:
def Lseries_dokchitser(self, prec=53, max_imaginary_part=0, max_asymp_coeffs=40, algorithm='gp'):
}}}
From Ifti
> [2] There seems to be some strange function declaration mangling which
> seems to be going on in the manual.
>
> For example the function Lseries_dokchitser in the manual
>
> http://sage.math.washington.edu/sage/doc/html/ref/module-sage.schemes.elliptic-curves.ell-rational-field.html
>
> reads
>
> Lseries_dokchitser(self, [prec=gp], [max_imaginary_part=40], [max_asymp_coeffs=0], [algorithm=53])
>
> whereas the source code and E.Lseries_dokchitser? help reads:
>
> def Lseries_dokchitser(self, prec=53,
> max_imaginary_part=0,
> max_asymp_coeffs=40,
> algorithm='gp'):
Fixed for SAGE-1.9. hg_doc patch below.
# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1169755223 28800
# Node ID 85b2f50482ffb977c19441aa1966e62a1dec70ca
# Parent 3b37261f05314307520d7fc83d34559ab3577746
Trac #41 -- ref manual autogenerated argument input list had defaults *backwards*.
diff -r 3b37261f0531 -r 85b2f50482ff ref/update_script.py
--- a/ref/update_script.py Thu Jan 25 11:27:19 2007 -0800
+++ b/ref/update_script.py Thu Jan 25 12:00:23 2007 -0800
@@ -229,8 +229,10 @@ def doc_method(name, f, source_code=None
except TypeError:
args = []; defaults=[]
if defaults != None:
+ n = len(args)
for i in range(len(defaults)):
- args[len(args)-1-i] = '\\optional{%s=%s}'%(args[len(args)-1-i],defaults[i])
+ args[n-1-i] = '\\optional{%s=%s}'%(
+ args[n-1-i],defaults[len(defaults)-i-1])
if source_code and len(args) == 0:
args = determine_args_from_src(source_code, name, cls)
Description changed:
---
+++
@@ -8,7 +8,7 @@
> http://modular.math.washington.edu/sage/doc/html/ref/module-sage.rings.multi-polynomial-ring.html
>
> MPolynomialRing(base_ring, [n=False], [names=degrevlex],
-> [order=None], [macaulay2=1])
+> [order=None], [macaulay2=1])
>
> with
>
That's really weird. Many thanks for pointing out the problem. That documentation is generated from the source code, so I'll investigate the script that does the generation. Again, thanks for the bug report.
Component: user interface
Issue created by migration from https://trac.sagemath.org/ticket/41