From e3d59bf553c7176f235cb128a70f4fcb0d45d3bd Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 9 May 2026 10:55:09 +0300 Subject: [PATCH] gh-149083: Convert `_initial_missing` for pure py `reduce` to `sentinel` (GH-149536) (cherry picked from commit bc8cf07d8dbb4341955dc85d9b2bf273ec5852c7) Co-authored-by: sobolevn --- Lib/functools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/functools.py b/Lib/functools.py index cd374631f16792..e03a77f204b544 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -232,7 +232,7 @@ def __ge__(self, other): ### reduce() sequence to a single item ################################################################################ -_initial_missing = object() +_initial_missing = sentinel('_initial_missing') def reduce(function, sequence, initial=_initial_missing): """