Skip to content

Conversation

skirpichev
Copy link
Contributor

@skirpichev skirpichev commented Sep 21, 2024

Most functions in the module return floats, some might be clearly (for the reader) identified as returning integers (e.g. comb(), non-integer inputs rejected) and few (e.g. prod() and sumprod()) return something, that depends on types in the input.

New preamble should cover all three cases.


📚 Documentation preview 📚: https://cpython-previews--124297.org.readthedocs.build/

Most functions in the module return floats, some might be clearly (for
the reader) identified as returning integers (e.g. comb(), non-integer
inputs rejected) and few (e.g. prod() and sumprod()) return something,
that depends on types in the input.
@skirpichev
Copy link
Contributor Author

CC @rhettinger (asked for review as you were assigned on issue)

Copy link
Contributor

@eendebakpt eendebakpt left a comment

Choose a reason for hiding this comment

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

Approved. The text is an improvement since "all return values are floats" was not correct. For the methods where the exact return type is important, we can add documentation to the specific method on followup PRs.

@skirpichev skirpichev removed the needs backport to 3.12 only security fixes label Apr 8, 2025
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@skirpichev skirpichev closed this May 20, 2025
@skirpichev skirpichev deleted the math-preamble-90984 branch May 20, 2025 14:52
@AA-Turner AA-Turner removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants