[Python-checkins] r84106 - in python/branches/py3k: Lib/doctest.py Lib/inspect.py Modules/_threadmodule.c Modules/pwdmodule.c Objects/typeobject.c

alexander.belopolsky python-checkins at python.org
Mon Aug 16 22:17:07 CEST 2010


Author: alexander.belopolsky
Date: Mon Aug 16 22:17:07 2010
New Revision: 84106

Log:
Issue #8983: Corrected docstrings.

Modified:
   python/branches/py3k/Lib/doctest.py
   python/branches/py3k/Lib/inspect.py
   python/branches/py3k/Modules/_threadmodule.c
   python/branches/py3k/Modules/pwdmodule.c
   python/branches/py3k/Objects/typeobject.c

Modified: python/branches/py3k/Lib/doctest.py
==============================================================================
--- python/branches/py3k/Lib/doctest.py	(original)
+++ python/branches/py3k/Lib/doctest.py	Mon Aug 16 22:17:07 2010
@@ -1786,7 +1786,7 @@
 
     Return (#failures, #tests).
 
-    See doctest.__doc__ for an overview.
+    See help(doctest) for an overview.
 
     Optional keyword arg "name" gives the name of the module; by default
     use m.__name__.

Modified: python/branches/py3k/Lib/inspect.py
==============================================================================
--- python/branches/py3k/Lib/inspect.py	(original)
+++ python/branches/py3k/Lib/inspect.py	Mon Aug 16 22:17:07 2010
@@ -159,7 +159,7 @@
 
     Generator function objects provides same attributes as functions.
 
-    See isfunction.__doc__ for attributes listing."""
+    See help(isfunction) for attributes listing."""
     return bool((isfunction(object) or ismethod(object)) and
                 object.__code__.co_flags & CO_GENERATOR)
 

Modified: python/branches/py3k/Modules/_threadmodule.c
==============================================================================
--- python/branches/py3k/Modules/_threadmodule.c	(original)
+++ python/branches/py3k/Modules/_threadmodule.c	Mon Aug 16 22:17:07 2010
@@ -1078,7 +1078,7 @@
 "allocate_lock() -> lock object\n\
 (allocate() is an obsolete synonym)\n\
 \n\
-Create a new lock object.  See LockType.__doc__ for information about locks.");
+Create a new lock object.  See help(LockType) for information about locks.");
 
 static PyObject *
 thread_get_ident(PyObject *self)

Modified: python/branches/py3k/Modules/pwdmodule.c
==============================================================================
--- python/branches/py3k/Modules/pwdmodule.c	(original)
+++ python/branches/py3k/Modules/pwdmodule.c	Mon Aug 16 22:17:07 2010
@@ -100,7 +100,7 @@
 "getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,\n\
                   pw_gid,pw_gecos,pw_dir,pw_shell)\n\
 Return the password database entry for the given numeric user ID.\n\
-See pwd.__doc__ for more on password database entries.");
+See help(pwd) for more on password database entries.");
 
 static PyObject *
 pwd_getpwuid(PyObject *self, PyObject *args)
@@ -121,7 +121,7 @@
 "getpwnam(name) -> (pw_name,pw_passwd,pw_uid,\n\
                     pw_gid,pw_gecos,pw_dir,pw_shell)\n\
 Return the password database entry for the given user name.\n\
-See pwd.__doc__ for more on password database entries.");
+See help(pwd) for more on password database entries.");
 
 static PyObject *
 pwd_getpwnam(PyObject *self, PyObject *args)
@@ -152,7 +152,7 @@
 "getpwall() -> list_of_entries\n\
 Return a list of all available password database entries, \
 in arbitrary order.\n\
-See pwd.__doc__ for more on password database entries.");
+See help(pwd) for more on password database entries.");
 
 static PyObject *
 pwd_getpwall(PyObject *self)

Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c	(original)
+++ python/branches/py3k/Objects/typeobject.c	Mon Aug 16 22:17:07 2010
@@ -2515,7 +2515,7 @@
     {"__instancecheck__", type___instancecheck__, METH_O,
      PyDoc_STR("__instancecheck__() -> check if an object is an instance")},
     {"__subclasscheck__", type___subclasscheck__, METH_O,
-     PyDoc_STR("__subclasschck__ -> check if an class is a subclass")},
+     PyDoc_STR("__subclasscheck__() -> check if a class is a subclass")},
     {0}
 };
 
@@ -5521,7 +5521,7 @@
            wrap_descr_delete, "descr.__delete__(obj)"),
     FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
            "x.__init__(...) initializes x; "
-           "see x.__class__.__doc__ for signature",
+           "see help(type(x)) for signature",
            PyWrapperFlag_KEYWORDS),
     TPSLOT("__new__", tp_new, slot_tp_new, NULL, ""),
     TPSLOT("__del__", tp_del, slot_tp_del, NULL, ""),


More information about the Python-checkins mailing list