diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-05-08 07:56:32 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-05-08 07:56:32 (GMT) |
commit | 0fbdf261582b16e409ae929bdf9107ae9fe817fb (patch) | |
tree | 8277c639350d69afb59608effe7038385cb615d3 /Lib/operator.py | |
parent | 6f75a3e89ededd669be6517fe6f941c7a930df1b (diff) | |
parent | babc8227cc842287cf701674f2807c392b7a6350 (diff) | |
download | cpython-0fbdf261582b16e409ae929bdf9107ae9fe817fb.zip cpython-0fbdf261582b16e409ae929bdf9107ae9fe817fb.tar.gz cpython-0fbdf261582b16e409ae929bdf9107ae9fe817fb.tar.bz2 |
#16523: merge with 3.3.
Diffstat (limited to 'Lib/operator.py')
-rw-r--r-- | Lib/operator.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/operator.py b/Lib/operator.py index ee81266..d31a9a4 100644 --- a/Lib/operator.py +++ b/Lib/operator.py @@ -223,9 +223,9 @@ def length_hint(obj, default=0): class attrgetter: """ Return a callable object that fetches the given attribute(s) from its operand. - After f=attrgetter('name'), the call f(r) returns r.name. - After g=attrgetter('name', 'date'), the call g(r) returns (r.name, r.date). - After h=attrgetter('name.first', 'name.last'), the call h(r) returns + After f = attrgetter('name'), the call f(r) returns r.name. + After g = attrgetter('name', 'date'), the call g(r) returns (r.name, r.date). + After h = attrgetter('name.first', 'name.last'), the call h(r) returns (r.name.first, r.name.last). """ def __init__(self, attr, *attrs): @@ -250,8 +250,8 @@ class attrgetter: class itemgetter: """ Return a callable object that fetches the given item(s) from its operand. - After f=itemgetter(2), the call f(r) returns r[2]. - 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]. + After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3]) """ def __init__(self, item, *items): if not items: |