mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-117764: Fix and add signatures for many builtins (GH-117769)
This commit is contained in:
parent
94e9c35cd0
commit
3a8c1ca7e7
11 changed files with 45 additions and 30 deletions
|
|
@ -1165,8 +1165,8 @@ mappingproxy_reversed(PyObject *self, PyObject *Py_UNUSED(ignored))
|
|||
|
||||
static PyMethodDef mappingproxy_methods[] = {
|
||||
{"get", _PyCFunction_CAST(mappingproxy_get), METH_FASTCALL,
|
||||
PyDoc_STR("D.get(k[,d]) -> D[k] if k in D, else d."
|
||||
" d defaults to None.")},
|
||||
PyDoc_STR("get($self, key, default=None, /)\n--\n\n"
|
||||
"Return the value for key if key is in the mapping, else default.")},
|
||||
{"keys", mappingproxy_keys, METH_NOARGS,
|
||||
PyDoc_STR("D.keys() -> a set-like object providing a view on D's keys")},
|
||||
{"values", mappingproxy_values, METH_NOARGS,
|
||||
|
|
@ -1254,11 +1254,12 @@ mappingproxy.__new__ as mappingproxy_new
|
|||
|
||||
mapping: object
|
||||
|
||||
Read-only proxy of a mapping.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
mappingproxy_new_impl(PyTypeObject *type, PyObject *mapping)
|
||||
/*[clinic end generated code: output=65f27f02d5b68fa7 input=d2d620d4f598d4f8]*/
|
||||
/*[clinic end generated code: output=65f27f02d5b68fa7 input=c156df096ef7590c]*/
|
||||
{
|
||||
mappingproxyobject *mappingproxy;
|
||||
|
||||
|
|
@ -2024,7 +2025,7 @@ PyTypeObject PyDictProxy_Type = {
|
|||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_MAPPING, /* tp_flags */
|
||||
0, /* tp_doc */
|
||||
mappingproxy_new__doc__, /* tp_doc */
|
||||
mappingproxy_traverse, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
mappingproxy_richcompare, /* tp_richcompare */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue