Skip to content

gh-157135: Fix documentation errors in the half-turn *pi functions - #157136

Merged
StanFromIreland merged 1 commit into
python:mainfrom
fedonman:fix-math-atanpi-docstring-range
Sep 8, 2026
Merged

StanFromIreland merged 1 commit into
python:mainfrom
fedonman:fix-math-atanpi-docstring-range

Conversation

@fedonman

@fedonman fedonman commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

atanpi's docstring gave acospi's result range, the trigonometric summary table in Doc/library/math.rst described atan2pi with atan's formula, and the comments above m_atanpi and m_atan2pi both read asin(x)/pi. This corrects the four statements to say what the functions compute.

No changelog entry: these functions have not been released.

…tions

atanpi's docstring gave acospi's result range, the trigonometric
summary table described atan2pi with atan's formula, and the
comments above m_atanpi and m_atan2pi both read asin(x)/pi.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34439309 | 📁 Comparing a27a4ba against main (23180c5)

  🔍 Preview build  

1 file changed
± library/math.html
@skirpichev

Copy link
Copy Markdown
Member

No changelog entry: these functions have not been released.

We usually don't create news entries for docs-only changes.

@StanFromIreland
StanFromIreland merged commit 7f3d7d0 into python:main Sep 8, 2026
66 checks passed
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks for the fix. This doesn't have to be backported because IIRC these were added recently, right @skirpichev ?

@skirpichev

Copy link
Copy Markdown
Member

This doesn't have to be backported because IIRC these were added recently

Yes, it's only in 3.16: https://docs.python.org/3.16/whatsnew/3.16.html#math

maurycy added a commit to maurycy/cpython that referenced this pull request Sep 10, 2026
* main: (158 commits)
  pythongh-156924: Try reifying lazy imports in `ForwarRef.evaluate()` (python#156940)
  pythongh-156233: Fix typos and code snippet errors in the docs (python#156475)
  pythongh-156837: Refer to yield expressions in generator function definitions (pythonGH-156863)
  pythongh-155292: Skip updating unicodedata with mismatched interpreter (pythonGH-157066)
  pythongh-157170: Document the scope of global curses settings (pythonGH-157207)
  pythongh-155966: Correct handling of `math.tanpi` poles (python#155980)
  pythongh-157170: Restore use_env() after test_use_prescr_screen in test_curses (pythonGH-157171)
  pythongh-156910: fix deadlock in type_set_abstractmethods under free-threading (python#156948)
  pythongh-155648: Write the empty and placeholder IDLE tests (python#156260)
  pythongh-153569: centralize formatted-string state and source spans (python#156484)
  pythongh-157137: Mark the PEP 820 soft deprecations as 3.15, not `next` (python#157138)
  pythongh-152433: Use regular LoadLibrary in UWP for Windows system libs (pythonGH-156972)
  pythongh-121617: Fix Py_CLEAR() memcpy in C++: replace NULL with _Py_NULL (python#157188)
  pythongh-157135: Fix documentation errors in the `math.atan{2}pi` functions (python#157136)
  pythongh-121617: Fix Py_CLEAR() in C++: replace NULL with _Py_NULL (python#157067)
  pythongh-156774: Speed up pdb startup with asyncio guard (python#156775)
  pythongh-156109: Allow static, non-framework iOS builds (python#156110)
  pythongh-156780: Emscripten: add missing EM_JS_DEPS (python#156798)
  pythongh-152936: Make privileged functions available on Android (python#152977)
  pythongh-123018: Keep the libedit history file header when truncating (pythonGH-157165)
  ...
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants