mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29453)
(cherry picked from commit 91275207296c39e495fe118019a757c4ddefede8) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
This commit is contained in:
parent
376218e1c6
commit
f5287ecd59
@ -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.
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user