summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-11-06 20:21:04 (GMT)
committerGitHub <noreply@github.com>2021-11-06 20:21:04 (GMT)
commit045f205ba4710c4c633364a4e2e098483af936e5 (patch)
tree9b045fedf22a66da3b8910d624a034fa65228ae9
parent8fdf6c64d3e0183c21f069d31d350a907ce42708 (diff)
downloadcpython-045f205ba4710c4c633364a4e2e098483af936e5.zip
cpython-045f205ba4710c4c633364a4e2e098483af936e5.tar.gz
cpython-045f205ba4710c4c633364a4e2e098483af936e5.tar.bz2
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29452)
(cherry picked from commit 91275207296c39e495fe118019a757c4ddefede8) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
-rw-r--r--Misc/NEWS.d/next/Documentation/2021-11-06-10-54-17.bpo-45392.JZnVOz.rst2
-rw-r--r--Objects/typeobject.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Documentation/2021-11-06-10-54-17.bpo-45392.JZnVOz.rst b/Misc/NEWS.d/next/Documentation/2021-11-06-10-54-17.bpo-45392.JZnVOz.rst
new file mode 100644
index 0000000..09c1657
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2021-11-06-10-54-17.bpo-45392.JZnVOz.rst
@@ -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.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index dc06cf0..02046e5 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4221,10 +4221,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)