mirror of
https://github.com/python/cpython
synced 2026-09-26 16:21:04 +03:00
in partial.__new__, before checking for the existence of the attribute 'func', first check whether the argument is an instance of partial.
5 lines
349 B
ReStructuredText
5 lines
349 B
ReStructuredText
Bring pure Python implementation ``functools.partial.__new__`` more in line
|
|
with the C-implementation by not just always checking for the presence of
|
|
the attribute ``'func'`` on the first argument of ``partial``. Instead, both
|
|
the Python version and the C version perform an ``isinstance(func, partial)``
|
|
check on the first argument of ``partial``.
|