Opened 2 years ago
Closed 2 years ago
#23743 closed enhancement (fixed)
inaccuracy in SR.var docstring
Reported by:  mforets  Owned by:  

Priority:  major  Milestone:  sage8.1 
Component:  symbolics  Keywords:  documentation, symbolic ring 
Cc:  zimmerma, chapoton  Merged in:  
Authors:  Marcelo Forets  Reviewers:  Marc Mezzarobba 
Report Upstream:  N/A  Work issues:  
Branch:  7968cf0 (Commits)  Commit:  7968cf076350a69aebc9c3a8f9b5350d36857ef8 
Dependencies:  Stopgaps: 
Description
in SR.var?
,
* "n"  (optional) nonnegative integer; number of symbolic variables, indexed from 0 to n1
but it should say positive
, because SR.var('x', 0)
fails.
(the exception message, raise ValueError("the number of variables should be a positive integer")
, is indeed correct).
Change History (6)
comment:1 Changed 2 years ago by
 Branch set to u/mforets/23743
 Commit set to e26225aa40e298785c94954c3126b584fe330ef0
 Status changed from new to needs_review
comment:2 Changed 2 years ago by
 Reviewers set to Marc Mezzarobba
 Status changed from needs_review to positive_review
Thanks!
(Since you added the assignment to x
, you could even replace the example displaying x
as a tuple by something like x[1]
or x[0], x[3]
to illustrate how the returned tuple can be used.)
comment:3 Changed 2 years ago by
 Commit changed from e26225aa40e298785c94954c3126b584fe330ef0 to 7968cf076350a69aebc9c3a8f9b5350d36857ef8
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
7968cf0  #2743 : examples showing use of x[i]

comment:4 Changed 2 years ago by
thanks for reviewing Marc!
yes, i like your idea, thus i've edited the example and this ticket needs review again.
comment:5 Changed 2 years ago by
 Status changed from needs_review to positive_review
comment:6 Changed 2 years ago by
 Branch changed from u/mforets/23743 to 7968cf076350a69aebc9c3a8f9b5350d36857ef8
 Resolution set to fixed
 Status changed from positive_review to closed
i've changed the example to the assignment,
x = SR.var('x', 4); x
, because it's the only way that it can be used later.New commits:
#23743 : fix docstring for keyword n of SR.var