]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45392: Update the docstring of the 'type' built-in (GH-29439)
authorMark Dickinson <mdickinson@enthought.com>
Sat, 6 Nov 2021 19:08:44 +0000 (19:08 +0000)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 19:08:44 +0000 (20:08 +0100)
Misc/NEWS.d/next/Documentation/2021-11-06-10-54-17.bpo-45392.JZnVOz.rst [new file with mode: 0644]
Objects/typeobject.c

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 (file)
index 0000000..09c1657
--- /dev/null
@@ -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.
index 51ec93d875271a32f408870326ece3d3f3e1235f..4180a9d13c45f8c1a786b0091d682dd8859da058 100644 (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)