summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-01-31 18:52:45 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-01-31 18:52:45 (GMT)
commitf9b0cc7df6f5d0c9350edb4b587b851170fdeb18 (patch)
tree142b056c37b8493bd7a8cc8b90f31d009e447770 /Doc
parent4f0dcc9a9a4629607d4fff79912e8d0c86cd3914 (diff)
downloadcpython-f9b0cc7df6f5d0c9350edb4b587b851170fdeb18.zip
cpython-f9b0cc7df6f5d0c9350edb4b587b851170fdeb18.tar.gz
cpython-f9b0cc7df6f5d0c9350edb4b587b851170fdeb18.tar.bz2
Document __module__.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ref/ref3.tex14
1 files changed, 11 insertions, 3 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index a109678..064794e 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -436,8 +436,10 @@ parameter list.
\obindex{user-defined function}
Special attributes: \member{func_doc} or \member{__doc__} is the
-function's documentation string, or None if unavailable;
+function's documentation string, or \code{None} if unavailable;
\member{func_name} or \member{__name__} is the function's name;
+\member{__module__} is the name of the module the function was defined
+in, or \code{None} if unavailable;
\member{func_defaults} is a tuple containing default argument values for
those arguments that have defaults, or \code{None} if no arguments
have a default value; \member{func_code} is the code object representing
@@ -460,6 +462,7 @@ description of internal types below.
\ttindex{func_doc}
\ttindex{__doc__}
\ttindex{__name__}
+ \ttindex{__module__}
\ttindex{__dict__}
\ttindex{func_defaults}
\ttindex{func_closure}
@@ -482,10 +485,14 @@ object, \member{im_func} is the function object;
or the class that asked for the method for unbound methods);
\member{__doc__} is the method's documentation (same as
\code{im_func.__doc__}); \member{__name__} is the method name (same as
-\code{im_func.__name__}).
+\code{im_func.__name__}); \member{__module__} is the name of the
+module the method was defined in, or \code{None} if unavailable.
\versionchanged[\member{im_self} used to refer to the class that
defined the method]{2.2}
\withsubitem{(method attribute)}{
+ \ttindex{__doc__}
+ \ttindex{__name__}
+ \ttindex{__module__}
\ttindex{im_func}
\ttindex{im_self}}
@@ -555,7 +562,8 @@ determined by the C function.
Special read-only attributes: \member{__doc__} is the function's
documentation string, or \code{None} if unavailable; \member{__name__}
is the function's name; \member{__self__} is set to \code{None} (but see
-the next item).
+the next item); \member{__module__} is the name of the module the
+function was defined in or \code{None} if unavailable.
\obindex{built-in function}
\obindex{function}
\indexii{C}{language}