Skip to content

Commit 9127520

Browse files
authored
bpo-45392: Update the docstring of the 'type' built-in (GH-29439)
1 parent cc1cbcb commit 9127520

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update the docstring of the :class:`type` built-in to remove a redundant
2+
line and to mention keyword arguments for the constructor.

Objects/typeobject.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -4268,10 +4268,8 @@ static PyMethodDef type_methods[] = {
42684268
};
42694269

42704270
PyDoc_STRVAR(type_doc,
4271-
/* this text signature cannot be accurate yet. will fix. --larry */
4272-
"type(object_or_name, bases, dict)\n"
42734271
"type(object) -> the object's type\n"
4274-
"type(name, bases, dict) -> a new type");
4272+
"type(name, bases, dict, **kwds) -> a new type");
42754273

42764274
static int
42774275
type_traverse(PyTypeObject *type, visitproc visit, void *arg)

0 commit comments

Comments
 (0)