summaryrefslogtreecommitdiff
path: root/Doc/extending
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-07-11 10:43:08 +0000
committerGeorg Brandl <georg@python.org>2009-07-11 10:43:08 +0000
commit4c4bf3e19b06764bcff556f6fde1c3f78ff5e4c8 (patch)
tree3d8dc454e2e2bddbaf680a1035ecfe1ea04d83ca /Doc/extending
parente469897ce23d3aabdc0a2e3d13605b733532a90b (diff)
downloadcpython-4c4bf3e19b06764bcff556f6fde1c3f78ff5e4c8.tar.gz
#6421: The self argument of module-level PyCFunctions is now a reference to the module object.
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/extending.rst6
1 files changed, 2 insertions, 4 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index 7e680dbca8..497180a692 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -82,10 +82,8 @@ example, the single expression ``"ls -l"``) to the arguments passed to the C
function. The C function always has two arguments, conventionally named *self*
and *args*.
-The *self* argument is only used when the C function implements a built-in
-method, not a function. In the example, *self* will always be a *NULL* pointer,
-since we are defining a function, not a method. (This is done so that the
-interpreter doesn't have to understand two different types of C functions.)
+The *self* argument points to the module object for module-level functions;
+for a method it would point to the object instance.
The *args* argument will be a pointer to a Python tuple object containing the
arguments. Each item of the tuple corresponds to an argument in the call's