Skip to content

Commit 045f205

Browse files
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29452)
(cherry picked from commit 9127520) Co-authored-by: Mark Dickinson <[email protected]>
1 parent 8fdf6c6 commit 045f205

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4221,10 +4221,8 @@ static PyMethodDef type_methods[] = {
42214221
};
42224222

42234223
PyDoc_STRVAR(type_doc,
4224-
/* this text signature cannot be accurate yet. will fix. --larry */
4225-
"type(object_or_name, bases, dict)\n"
42264224
"type(object) -> the object's type\n"
4227-
"type(name, bases, dict) -> a new type");
4225+
"type(name, bases, dict, **kwds) -> a new type");
42284226

42294227
static int
42304228
type_traverse(PyTypeObject *type, visitproc visit, void *arg)

0 commit comments

Comments
 (0)