Opened 19 months ago
Closed 19 months ago
#25370 closed defect (fixed)
prime_to_m_part function : Wrong docstring examples
Reported by:  vklein  Owned by:  vklein 

Priority:  trivial  Milestone:  sage8.3 
Component:  basic arithmetic  Keywords:  thursdaysbdx 
Cc:  Merged in:  
Authors:  Vincent Klein  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  c9087fc (Commits)  Commit:  c9087fca0f6c1a26ad9965ffe4446da009ce36fd 
Dependencies:  Stopgaps: 
Description (last modified by )
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
Change History (14)
comment:1 Changed 19 months ago by
 Owner changed from (none) to vklein
comment:2 Changed 19 months ago by
 Description modified (diff)
comment:3 Changed 19 months ago by
 Branch set to u/vklein/prime_to_m_part_function___wrong_docstring_examples
comment:4 Changed 19 months ago by
 Commit set to f29a93d8e51e916c92dc4cd9f4f6c320a42dd6c7
 Status changed from new to needs_review
comment:5 Changed 19 months ago by
 Reviewers set to Vincent Delecroix
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.
comment:6 Changed 19 months ago by
 Commit changed from f29a93d8e51e916c92dc4cd9f4f6c320a42dd6c7 to c1ecfac769b722c00f47b703f6fc9e9e2e475713
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
c1ecfac  Trac #25370: Fix docstring example in prime_to_m_part ...

comment:7 Changed 19 months ago by
Done
comment:8 Changed 19 months ago by
Too many also in "Note also that integers also have a method with the same name"
comment:9 Changed 19 months ago by
 Status changed from needs_review to needs_work
comment:10 Changed 19 months ago by
 Keywords thursdaysbdx added
comment:11 Changed 19 months ago by
 Commit changed from c1ecfac769b722c00f47b703f6fc9e9e2e475713 to c9087fca0f6c1a26ad9965ffe4446da009ce36fd
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
c9087fc  Trac #25370: Fix docstring example in prime_to_m_part ...

comment:12 Changed 19 months ago by
 Status changed from needs_work to needs_review
comment:13 Changed 19 months ago by
 Status changed from needs_review to positive_review
comment:14 Changed 19 months ago by
 Branch changed from u/vklein/prime_to_m_part_function___wrong_docstring_examples to c9087fca0f6c1a26ad9965ffe4446da009ce36fd
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Trac #25370: Fix docstring example in prime_to_m_part ...