Skip to content

Remove outdated statement from math about C standard #134621

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 24, 2025

The PEP 791 draft says:

The math documentation says: “This module provides access to the mathematical functions defined by the C standard.” But, over time the module was populated with functions that aren’t related to the C standard or floating-point arithmetics.

Let's start by removing this outdated sentence from the docs.


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

Copy link
Member

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

“This module provides access to the mathematical functions defined by the C standard.”

Obviously, -1 to that.

There is nothing wrong with this sentence - the module does provide access to such functions (at least for most of them). Edit: It's just not exhaustive description of the module content.

@@ -10,9 +10,6 @@

--------------

This module provides access to the mathematical functions defined by the C
standard.

These functions cannot be used with complex numbers; use the functions of the
Copy link
Member

Choose a reason for hiding this comment

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

Now this sentence seems weird. What "functions"? I think we should say that provides access to mathematical functions defined by the C standard and others. Or we can use the same sentence as for math.h on https://cplusplus.com/reference/cmath/:

Header declares a set of functions to compute common mathematical operations and transformations:

Copy link
Member Author

Choose a reason for hiding this comment

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

The "mathematical functions" in math that were just written in big letters :)

image

https://cpython-previews--134621.org.readthedocs.build/en/134621/library/math.html

Do you think it's not clear?

Copy link
Member

Choose a reason for hiding this comment

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

I personally don't think it's clear because I don't see the title as being tied with the first sentence. Maybe it's because I'm not native, but even in French I wouldn't referred to something that I said in a title. I also like the fact that we have a brief sentence starting with "This module" or something like that (AFAICT, it's a common way to introduce modules)

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 needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip issue skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants