bpo-45392: Update the docstring of the 'type' built-in (GH-29439)

This commit is contained in:
Mark Dickinson 2021-11-06 19:08:44 +00:00 committed by GitHub
parent cc1cbcbb2d
commit 9127520729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -4268,10 +4268,8 @@ static PyMethodDef type_methods[] = {
};
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(name, bases, dict) -> a new type");
"type(name, bases, dict, **kwds) -> a new type");
static int
type_traverse(PyTypeObject *type, visitproc visit, void *arg)