[Python-checkins] cpython: indicate return value on __dir__ methods

benjamin.peterson python-checkins at python.org
Tue May 24 19:46:12 CEST 2011


http://hg.python.org/cpython/rev/6f078d80898f
changeset:   70342:6f078d80898f
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue May 24 12:46:15 2011 -0500
summary:
  indicate return value on __dir__ methods

files:
  Objects/moduleobject.c |  2 +-
  Objects/typeobject.c   |  4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -437,7 +437,7 @@
 
 static PyMethodDef module_methods[] = {
     {"__dir__", module_dir, METH_NOARGS,
-     PyDoc_STR("__dir__() -> specialized dir() implementation")},
+     PyDoc_STR("__dir__() -> list\nspecialized dir() implementation")},
     {0}
 };
 
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2662,7 +2662,7 @@
     {"__subclasscheck__", type___subclasscheck__, METH_O,
      PyDoc_STR("__subclasscheck__() -> bool\ncheck if a class is a subclass")},
     {"__dir__", type_dir, METH_NOARGS,
-     PyDoc_STR("__dir__() -> specialized __dir__ implementation for types")},
+     PyDoc_STR("__dir__() -> list\nspecialized __dir__ implementation for types")},
     {0}
 };
 
@@ -3575,7 +3575,7 @@
     {"__sizeof__", object_sizeof, METH_NOARGS,
      PyDoc_STR("__sizeof__() -> int\nsize of object in memory, in bytes")},
     {"__dir__", object_dir, METH_NOARGS,
-     PyDoc_STR("__dir__() -> default dir() implementation")},
+     PyDoc_STR("__dir__() -> list\ndefault dir() implementation")},
     {0}
 };
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list