mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
return views from dict proxy items/values/keys #10630
This commit is contained in:
parent
b5d793309e
commit
0eb7f86320
2 changed files with 14 additions and 8 deletions
|
|
@ -710,19 +710,19 @@ proxy_get(proxyobject *pp, PyObject *args)
|
|||
static PyObject *
|
||||
proxy_keys(proxyobject *pp)
|
||||
{
|
||||
return PyMapping_Keys(pp->dict);
|
||||
return PyObject_CallMethod(pp->dict, "keys", NULL);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
proxy_values(proxyobject *pp)
|
||||
{
|
||||
return PyMapping_Values(pp->dict);
|
||||
return PyObject_CallMethod(pp->dict, "values", NULL);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
proxy_items(proxyobject *pp)
|
||||
{
|
||||
return PyMapping_Items(pp->dict);
|
||||
return PyObject_CallMethod(pp->dict, "items", NULL);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue