diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-04-12 10:56:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 10:56:41 (GMT) |
commit | 3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8 (patch) | |
tree | 9503a1be17bd94635c29b1452afebb5bdb84dba5 /Objects/descrobject.c | |
parent | 94e9c35cd0f2898693bb96eb1579fe0329648fa2 (diff) | |
download | cpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.zip cpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.tar.gz cpython-3a8c1ca7e7ce181ddb29c9393171d5c508ce89c8.tar.bz2 |
gh-117764: Fix and add signatures for many builtins (GH-117769)
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r-- | Objects/descrobject.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 3423f15..029318f 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -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 */ |