https://github.com/python/cpython/commit/915b6c1572285f2bd469be177fe523eca52951f1
commit: 915b6c1572285f2bd469be177fe523eca52951f1
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2026-05-09T08:27:29Z
summary:

[3.15] gh-149083: Convert `_initial_missing` for pure py `reduce` to `sentinel` 
(GH-149536) (#149592)

gh-149083: Convert `_initial_missing` for pure py `reduce` to `sentinel` 
(GH-149536)
(cherry picked from commit bc8cf07d8dbb4341955dc85d9b2bf273ec5852c7)

Co-authored-by: sobolevn <[email protected]>

files:
M Lib/functools.py

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):
     """

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to