MCPcopy Index your code
hub / github.com/RustPython/RustPython / _warn_python_reduce_kwargs

Function _warn_python_reduce_kwargs

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

Source from the content-addressed store, hash-verified

1137 __class_getitem__ = classmethod(GenericAlias)
1138
1139def _warn_python_reduce_kwargs(py_reduce):
1140 @wraps(py_reduce)
1141 def wrapper(*args, **kwargs):
1142 if 'function' in kwargs or 'sequence' in kwargs:
1143 import os
1144 import warnings
1145 warnings.warn(
1146 'Calling functools.reduce with keyword arguments '
1147 '"function" or "sequence" '
1148 'is deprecated in Python 3.14 and will be '
1149 'forbidden in Python 3.16.',
1150 DeprecationWarning,
1151 skip_file_prefixes=(os.path.dirname(__file__),))
1152 return py_reduce(*args, **kwargs)
1153 return wrapper
1154
1155reduce = _warn_python_reduce_kwargs(reduce)
1156del _warn_python_reduce_kwargs

Callers 1

functools.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected