]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141370: document undefined behavior of Py_ABS() (GH-141439)
authorSergey B Kirpichev <skirpichev@gmail.com>
Wed, 12 Nov 2025 09:50:44 +0000 (12:50 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Nov 2025 09:50:44 +0000 (11:50 +0200)
Doc/c-api/intro.rst

index 6e1a9dcb35543bb3e1defdd325be76dfbb05a45b..c76cc2f70ecccffebd9edfcf5ba056e5a07d4e46 100644 (file)
@@ -121,6 +121,10 @@ complete listing.
 
    Return the absolute value of ``x``.
 
+   If the result cannot be represented (for example, if ``x`` has
+   :c:macro:`!INT_MIN` value for :c:expr:`int` type), the behavior is
+   undefined.
+
    .. versionadded:: 3.3
 
 .. c:macro:: Py_ALWAYS_INLINE