mirror of https://github.com/python/cpython
bpo-45392: Update the docstring of the 'type' built-in (GH-29439)
This commit is contained in:
parent
cc1cbcbb2d
commit
9127520729
|
@ -0,0 +1,2 @@
|
||||||
|
Update the docstring of the :class:`type` built-in to remove a redundant
|
||||||
|
line and to mention keyword arguments for the constructor.
|
|
@ -4268,10 +4268,8 @@ static PyMethodDef type_methods[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
PyDoc_STRVAR(type_doc,
|
PyDoc_STRVAR(type_doc,
|
||||||
/* this text signature cannot be accurate yet. will fix. --larry */
|
|
||||||
"type(object_or_name, bases, dict)\n"
|
|
||||||
"type(object) -> the object's type\n"
|
"type(object) -> the object's type\n"
|
||||||
"type(name, bases, dict) -> a new type");
|
"type(name, bases, dict, **kwds) -> a new type");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
type_traverse(PyTypeObject *type, visitproc visit, void *arg)
|
type_traverse(PyTypeObject *type, visitproc visit, void *arg)
|
||||||
|
|
Loading…
Reference in New Issue