mirror of
https://github.com/python/cpython.git
synced 2025-12-22 08:29:12 +00:00
indicate return value on __dir__ methods
This commit is contained in:
parent
1fdcf0e4b1
commit
c7284122be
2 changed files with 3 additions and 3 deletions
|
|
@ -437,7 +437,7 @@ module_dir(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
static PyMethodDef module_methods[] = {
|
static PyMethodDef module_methods[] = {
|
||||||
{"__dir__", module_dir, METH_NOARGS,
|
{"__dir__", module_dir, METH_NOARGS,
|
||||||
PyDoc_STR("__dir__() -> specialized dir() implementation")},
|
PyDoc_STR("__dir__() -> list\nspecialized dir() implementation")},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2662,7 +2662,7 @@ static PyMethodDef type_methods[] = {
|
||||||
{"__subclasscheck__", type___subclasscheck__, METH_O,
|
{"__subclasscheck__", type___subclasscheck__, METH_O,
|
||||||
PyDoc_STR("__subclasscheck__() -> bool\ncheck if a class is a subclass")},
|
PyDoc_STR("__subclasscheck__() -> bool\ncheck if a class is a subclass")},
|
||||||
{"__dir__", type_dir, METH_NOARGS,
|
{"__dir__", type_dir, METH_NOARGS,
|
||||||
PyDoc_STR("__dir__() -> specialized __dir__ implementation for types")},
|
PyDoc_STR("__dir__() -> list\nspecialized __dir__ implementation for types")},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3575,7 +3575,7 @@ static PyMethodDef object_methods[] = {
|
||||||
{"__sizeof__", object_sizeof, METH_NOARGS,
|
{"__sizeof__", object_sizeof, METH_NOARGS,
|
||||||
PyDoc_STR("__sizeof__() -> int\nsize of object in memory, in bytes")},
|
PyDoc_STR("__sizeof__() -> int\nsize of object in memory, in bytes")},
|
||||||
{"__dir__", object_dir, METH_NOARGS,
|
{"__dir__", object_dir, METH_NOARGS,
|
||||||
PyDoc_STR("__dir__() -> default dir() implementation")},
|
PyDoc_STR("__dir__() -> list\ndefault dir() implementation")},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue