Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inaccuracy in SR.var docstring #23743

Closed
mforets mannequin opened this issue Aug 29, 2017 · 10 comments
Closed

inaccuracy in SR.var docstring #23743

mforets mannequin opened this issue Aug 29, 2017 · 10 comments

Comments

@mforets
Copy link
Mannequin

mforets mannequin commented Aug 29, 2017

in SR.var?,

* "n" -- (optional) nonnegative integer; number of symbolic
     variables, indexed from 0 to n-1

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).

CC: @zimmermann6 @fchapoton

Component: symbolics

Keywords: symbolic ring

Author: Marcelo Forets

Branch/Commit: 7968cf0

Reviewer: Marc Mezzarobba

Issue created by migration from https://trac.sagemath.org/ticket/23743

@mforets mforets mannequin added this to the sage-8.1 milestone Aug 29, 2017
@mforets mforets mannequin added c: symbolics labels Aug 29, 2017
@mforets
Copy link
Mannequin Author

mforets mannequin commented Aug 29, 2017

Branch: u/mforets/23743

@mforets
Copy link
Mannequin Author

mforets mannequin commented Aug 29, 2017

Author: Marcelo Forets

@mforets
Copy link
Mannequin Author

mforets mannequin commented Aug 29, 2017

comment:1

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:

e26225a#23743 : fix docstring for keyword n of SR.var

@mforets
Copy link
Mannequin Author

mforets mannequin commented Aug 29, 2017

Commit: e26225a

@mforets mforets mannequin added the s: needs review label Aug 29, 2017
@mezzarobba
Copy link
Member

Reviewer: Marc Mezzarobba

@mezzarobba
Copy link
Member

comment:2

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.)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 29, 2017

Changed commit from e26225a to 7968cf0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 29, 2017

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]

@mforets
Copy link
Mannequin Author

mforets mannequin commented Aug 29, 2017

comment:4

thanks for reviewing Marc!

yes, i like your idea, thus i've edited the example and this ticket needs review again.

@vbraun
Copy link
Member

vbraun commented Sep 10, 2017

Changed branch from u/mforets/23743 to 7968cf0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants