]> granicus.if.org Git - python/commitdiff
merge 3.2
authorBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2011 17:45:33 +0000 (12:45 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2011 17:45:33 +0000 (12:45 -0500)
1  2 
Objects/typeobject.c

index 128b9fe0217682163f947f9aeff4764d8d9f0dcf,3c724fd7c6757dc71da793d73ffba231f3abbea1..a597ba0fbb137a46b4772512c329911a21fbbeda
@@@ -2658,11 -2582,9 +2658,11 @@@ static PyMethodDef type_methods[] = 
       PyDoc_STR("__prepare__() -> dict\n"
                 "used to create the namespace for the class statement")},
      {"__instancecheck__", type___instancecheck__, METH_O,
-      PyDoc_STR("__instancecheck__() -> check if an object is an instance")},
+      PyDoc_STR("__instancecheck__() -> bool\ncheck if an object is an instance")},
      {"__subclasscheck__", type___subclasscheck__, METH_O,
-      PyDoc_STR("__subclasscheck__() -> check if a class is a subclass")},
+      PyDoc_STR("__subclasscheck__() -> bool\ncheck if a class is a subclass")},
 +    {"__dir__", type_dir, METH_NOARGS,
 +     PyDoc_STR("__dir__() -> specialized __dir__ implementation for types")},
      {0}
  };
  
@@@ -3573,9 -3430,7 +3573,9 @@@ static PyMethodDef object_methods[] = 
      {"__format__", object_format, METH_VARARGS,
       PyDoc_STR("default object formatter")},
      {"__sizeof__", object_sizeof, METH_NOARGS,
-      PyDoc_STR("__sizeof__() -> size of object in memory, in bytes")},
+      PyDoc_STR("__sizeof__() -> int\nsize of object in memory, in bytes")},
 +    {"__dir__", object_dir, METH_NOARGS,
 +     PyDoc_STR("__dir__() -> default dir() implementation")},
      {0}
  };