summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-06 18:46:08 (GMT)
committerGeorg Brandl <georg@python.org>2013-10-06 18:46:08 (GMT)
commita072de14be1e8cd992404f300f0104fccedecaa9 (patch)
treeb498843500bf4ad8c077eea257f5768f49452f96
parent29fc4bf5c7b54bcbebd0f41796a2a28c3dc56d79 (diff)
downloadcpython-a072de14be1e8cd992404f300f0104fccedecaa9.zip
cpython-a072de14be1e8cd992404f300f0104fccedecaa9.tar.gz
cpython-a072de14be1e8cd992404f300f0104fccedecaa9.tar.bz2
Extending example: use Py_RETURN_NONE
-rw-r--r--Doc/extending/extending.rst4
1 files changed, 1 insertions, 3 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index e7c3f33..a559b56 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -719,9 +719,7 @@ Philbrick (philbrick@hks.com)::
action, voltage);
printf("-- Lovely plumage, the %s -- It's %s!\n", type, state);
- Py_INCREF(Py_None);
-
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef keywdarg_methods[] = {