summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-05-08 07:53:11 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-05-08 07:53:11 (GMT)
commit5f4ba6b4e0337503e6aa7c47de2670e2a69a0026 (patch)
treec11cfe12882dd2f226e397740b8cbd33cfce1eb5 /Modules
parent4ccdc966cea00962280dbc0b365ceb3e05ba1afb (diff)
downloadcpython-5f4ba6b4e0337503e6aa7c47de2670e2a69a0026.zip
cpython-5f4ba6b4e0337503e6aa7c47de2670e2a69a0026.tar.gz
cpython-5f4ba6b4e0337503e6aa7c47de2670e2a69a0026.tar.bz2
#16523: improve attrgetter/itemgetter/methodcaller documentation.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/operator.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/operator.c b/Modules/operator.c
index 274d8aa..3f00588 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -412,8 +412,8 @@ PyDoc_STRVAR(itemgetter_doc,
"itemgetter(item, ...) --> itemgetter object\n\
\n\
Return a callable object that fetches the given item(s) from its operand.\n\
-After, f=itemgetter(2), the call f(r) returns r[2].\n\
-After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])");
+After f = itemgetter(2), the call f(r) returns r[2].\n\
+After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])");
static PyTypeObject itemgetter_type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -592,9 +592,9 @@ PyDoc_STRVAR(attrgetter_doc,
"attrgetter(attr, ...) --> attrgetter object\n\
\n\
Return a callable object that fetches the given attribute(s) from its operand.\n\
-After, f=attrgetter('name'), the call f(r) returns r.name.\n\
-After, g=attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).\n\
-After, h=attrgetter('name.first', 'name.last'), the call h(r) returns\n\
+After f = attrgetter('name'), the call f(r) returns r.name.\n\
+After g = attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).\n\
+After h = attrgetter('name.first', 'name.last'), the call h(r) returns\n\
(r.name.first, r.name.last).");
static PyTypeObject attrgetter_type = {
@@ -724,8 +724,8 @@ PyDoc_STRVAR(methodcaller_doc,
"methodcaller(name, ...) --> methodcaller object\n\
\n\
Return a callable object that calls the given method on its operand.\n\
-After, f = methodcaller('name'), the call f(r) returns r.name().\n\
-After, g = methodcaller('name', 'date', foo=1), the call g(r) returns\n\
+After f = methodcaller('name'), the call f(r) returns r.name().\n\
+After g = methodcaller('name', 'date', foo=1), the call g(r) returns\n\
r.name('date', foo=1).");
static PyTypeObject methodcaller_type = {