]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29453)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 6 Nov 2021 20:17:59 +0000 (13:17 -0700)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 20:17:59 +0000 (21:17 +0100)
(cherry picked from commit 91275207296c39e495fe118019a757c4ddefede8)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
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 feae25f2eb367a8c3b7bf6a9e67137e89d099cf9..1cdf80bfcf5affe176967d82d2cf8c7d219879ae 100644 (file)
@@ -3673,10 +3673,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)