]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix comments/docstring problems related to SF bug # 821818
authorAlex Martelli <aleaxit@gmail.com>
Sun, 2 Nov 2003 19:39:14 +0000 (19:39 +0000)
committerAlex Martelli <aleaxit@gmail.com>
Sun, 2 Nov 2003 19:39:14 +0000 (19:39 +0000)
Lib/pyclbr.py

index 26cc0ce0dade507065f6e232c8c6c187bda30703..d536f5c0d5e6a8683a6e5ebcae07980c3d56e2ac 100644 (file)
@@ -7,13 +7,19 @@ The interface consists of a single function:
         readmodule_ex(module [, path])
 where module is the name of a Python module, and path is an optional
 list of directories where the module is to be searched.  If present,
-path is prepended to the system search path sys.path.  The return
-value is a dictionary.  The keys of the dictionary are the names of
-the classes defined in the module (including classes that are defined
-via the from XXX import YYY construct).  The values are class
-instances of the class Class defined here.  One special key/value pair
-is present for packages: the key '__path__' has a list as its value
-which contains the package search path.
+path is prepended to the system search path sys.path.  The return value
+is a dictionary.  The keys of the dictionary are the names of the
+classes and top-level functions defined in the module (including ones
+that are defined via the from XXX import YYY construct).  The values are
+instances of the classes Class and Function defined here.  One special
+key/value pair is present for packages: the key '__path__' has as its
+value a list which contains the package search path.
+
+(For compatibility, a function readmodule is also defined: it works just
+like readmodule_ex, but the dictionary it returns has only key/value
+pairs whose value is an instance of class Class, _not_ ones for which it
+would be an instance of Function. nor the special key/value pair for key
+'__path__' as described in the previous paragraph).
 
 A class is described by the class Class in this module.  Instances
 of this class have the following instance variables:
@@ -34,9 +40,9 @@ shouldn't happen often.
 A function is described by the class Function in this module.
 Instances of this class have the following instance variables:
         module -- the module name
-        name -- the name of the class
-        file -- the file in which the class was defined
-        lineno -- the line in the file on which the class statement occurred
+        name -- the name of the function
+        file -- the file in which the function was defined
+        lineno -- the line in the file on which the def statement occurred
 """
 
 import sys