]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141454)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Nov 2025 09:56:47 +0000 (10:56 +0100)
committerGitHub <noreply@github.com>
Wed, 12 Nov 2025 09:56:47 +0000 (09:56 +0000)
(cherry picked from commit 20f53df07d42c495a08c73a3d54b8dd9098a62f0)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Doc/c-api/intro.rst

index 096e4d34f664d9c54c8f85a93329e2e232097fd5..04c4d7284ad4fd033aca3b439c67a60ed6a03358 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