mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #27137: align Python & C implementations of functools.partial
The pure Python fallback implementation of functools.partial now matches the behaviour of its accelerated C counterpart for subclassing, pickling and text representation purposes. Patch by Emanuel Barry and Serhiy Storchaka.
This commit is contained in:
parent
eddc4b7272
commit
457fc9a69e
4 changed files with 179 additions and 89 deletions
|
@ -229,7 +229,7 @@ partial_repr(partialobject *pto)
|
|||
if (status != 0) {
|
||||
if (status < 0)
|
||||
return NULL;
|
||||
return PyUnicode_FromFormat("%s(...)", Py_TYPE(pto)->tp_name);
|
||||
return PyUnicode_FromString("...");
|
||||
}
|
||||
|
||||
arglist = PyUnicode_FromString("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue