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

Trac #34920: Fix description of inputs of primes. #35215

Merged
merged 1 commit into from
Apr 1, 2023

Conversation

Eloitor
Copy link
Contributor

@Eloitor Eloitor commented Feb 27, 2023

Fix docstring of the primes function.

πŸ“š Description

The documentation of primes states that "stop" is optional and "start" is required, when in fact it is the opposite.

Closes #34920

πŸ“ Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

βŒ› Dependencies

Comment on lines +1030 to +1034
- ``start`` - an integer (default: 2) optional argument -
giving lower bound for the primes

- ``stop`` - an integer (or infinity) optional argument -
giving upper (open) bound for the primes
- ``stop`` - an integer (or infinity) - giving upper (open) bound for the
primes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point mathematically. On the other hand, stop is actually an optional argument in the code sense. Should you change the argument to the function rather than changing the docs?

Then see this SO post for keeping the user interface the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I change the signature to primes(start=2, stop=None, proof=None) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats what I was thinking.

@trevorkarn
Copy link
Contributor

Now let's wait for the tests to run and pass.

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Documentation preview for this PR is ready! πŸŽ‰
Built with commit: 4c2010c

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 πŸŽ‰

Comparison is base (52a81cb) 88.57% compared to head (4c2010c) 88.58%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35215      +/-   ##
===========================================
+ Coverage    88.57%   88.58%   +0.01%     
===========================================
  Files         2140     2140              
  Lines       397273   397273              
===========================================
+ Hits        351891   351935      +44     
+ Misses       45382    45338      -44     
Impacted Files Coverage Ξ”
src/sage/arith/misc.py 90.99% <100.00%> (ΓΈ)
...e/combinat/cluster_algebra_quiver/mutation_type.py 50.11% <0.00%> (-2.02%) ⬇️
src/sage/modular/local_comp/liftings.py 98.33% <0.00%> (-1.67%) ⬇️
src/sage/groups/generic.py 88.34% <0.00%> (-0.68%) ⬇️
src/sage/modular/modform/numerical.py 94.19% <0.00%> (-0.65%) ⬇️
src/sage/doctest/forker.py 80.24% <0.00%> (-0.54%) ⬇️
src/sage/doctest/reporting.py 74.45% <0.00%> (-0.44%) ⬇️
src/sage/modular/arithgroup/arithgroup_perm.py 92.57% <0.00%> (-0.38%) ⬇️
src/sage/modular/overconvergent/hecke_series.py 98.76% <0.00%> (-0.31%) ⬇️
src/sage/graphs/graph_plot.py 84.33% <0.00%> (-0.29%) ⬇️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

β˜” View full report at Codecov.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

@trevorkarn
Copy link
Contributor

LGTM.

@vbraun vbraun merged commit 81e2b34 into sagemath:develop Apr 1, 2023
@mkoeppe mkoeppe added this to the sage-10.0 milestone Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Description of inputs for primes is misleading.
5 participants