Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
gh-141004: DocumentPy_MATH_{E, PI, TAU} constants#141373
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
| .. c:macro:: Py_MATH_E | ||
| The definition of the :data:`math.e` constant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You might include the constant value (with 5 digits after the dot) like:
| The definition of the:data:`math.e` constant. | |
| The definition of the:data:`math.e` constant (``2.71828...``). |
Same remark for other constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure, it is already provided in the docs of the Python functions. Do you feel strongly about this, if so I can add. Otherwise, Peter/Sergey, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't spend enough time with the math APIs to have much of an opinion here, so I yield to Victor and Sergey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| .. c:macro:: Py_MATH_E | ||
| The definition of the :data:`math.e` constant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think we need numbers here. Just the reference is enough.
But you might note c type:
| The definition of the:data:`math.e` constant. | |
| The definition(accurate for a:c:type:`double` type)of the:data:`math.e` constant. |
Same for other constants.
IMO, you should also reorder existing docs:Py_MATH_PIl must be right behind ofPy_MATH_PI, same forPy_MATH_El vsPy_MATH_E.
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--141373.org.readthedocs.build/en/141373/c-api/float.html#c.Py_MATH_E