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

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

index 22ad080828bca30ec47899bd2c3fbc76139cfeb1..bb790de11c35217dd5b6ed4e91348ab4b58924b6 100644 (file)
@@ -133,6 +133,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