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

prime_to_m_part function : Wrong docstring examples #25370

Closed
vinklein mannequin opened this issue May 16, 2018 · 15 comments
Closed

prime_to_m_part function : Wrong docstring examples #25370

vinklein mannequin opened this issue May 16, 2018 · 15 comments

Comments

@vinklein
Copy link
Mannequin

vinklein mannequin commented May 16, 2018

In function prime_to_m_part(m,n) from misc.py the examples in docstrings
don't call the function but call an instance method instead.

sage: 240.prime_to_m_part(2)
15

should be

sage: prime_to_m_part(240,2)
15

Component: basic arithmetic

Keywords: thursdaysbdx

Author: Vincent Klein

Branch/Commit: c9087fc

Reviewer: Vincent Delecroix

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

@vinklein vinklein mannequin added this to the sage-8.3 milestone May 16, 2018
@vinklein vinklein mannequin self-assigned this May 16, 2018
@vinklein

This comment has been minimized.

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 16, 2018

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 16, 2018

Author: Vincent Klein

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 16, 2018

Commit: f29a93d

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 16, 2018

New commits:

f29a93dTrac #25370: Fix docstring example in prime_to_m_part ...

@vinklein vinklein mannequin added the s: needs review label May 16, 2018
@videlec
Copy link
Contributor

videlec commented May 16, 2018

comment:5

I think that it is also nice to advertise that there is a method. For example you could add after the other examples

Note also that integers also have a method with the same name::

    sage: 240.prime_to_m_part(2)
    15

The aim of the documentation is multiple: doctest + user documentation.

@videlec
Copy link
Contributor

videlec commented May 16, 2018

Reviewer: Vincent Delecroix

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 17, 2018

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

c1ecfacTrac #25370: Fix docstring example in prime_to_m_part ...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 17, 2018

Changed commit from f29a93d to c1ecfac

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 17, 2018

comment:7

Done

@videlec
Copy link
Contributor

videlec commented May 17, 2018

comment:8

Too many also in "Note also that integers also have a method with the same name"

@vinklein
Copy link
Mannequin Author

vinklein mannequin commented May 17, 2018

Changed keywords from none to thursdaysbdx

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 17, 2018

Changed commit from c1ecfac to c9087fc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 17, 2018

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

c9087fcTrac #25370: Fix docstring example in prime_to_m_part ...

@vbraun
Copy link
Member

vbraun commented May 19, 2018

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