MCPcopy Index your code
hub / github.com/python/cpython / _warn_python_reduce_kwargs

Function _warn_python_reduce_kwargs

Lib/functools.py:1182–1196  ·  view source on GitHub ↗
(py_reduce)

Source from the content-addressed store, hash-verified

1180 __class_getitem__ = classmethod(GenericAlias)
1181
1182def _warn_python_reduce_kwargs(py_reduce):
1183 @wraps(py_reduce)
1184 def wrapper(*args, **kwargs):
1185 if 'function' in kwargs or 'sequence' in kwargs:
1186 import os
1187 import warnings
1188 warnings.warn(
1189 'Calling functools.reduce with keyword arguments '
1190 '"function" or "sequence" '
1191 'is deprecated in Python 3.14 and will be '
1192 'forbidden in Python 3.16.',
1193 DeprecationWarning,
1194 skip_file_prefixes=(os.path.dirname(__file__),))
1195 return py_reduce(*args, **kwargs)
1196 return wrapper
1197
1198reduce = _warn_python_reduce_kwargs(reduce)
1199del _warn_python_reduce_kwargs

Callers 1

functools.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…