Skip to content

Commit

Permalink
bpo-45392: Update the docstring of the 'type' built-in (GH-29439)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickinson authored Nov 6, 2021
1 parent cc1cbcb commit 9127520
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 1 addition & 3 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9127520

Please sign in to comment.