Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffec810

Browse files
committed
indent properly
1 parent b46b9d5 commit ffec810

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Doc/library/operator.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,15 @@ expect a function argument.
344344
operand's :meth:`__getitem__` method. If multiple items are specified,
345345
returns a tuple of lookup values. Equivalent to::
346346

347-
def itemgetter(*items):
348-
if len(items) == 1:
349-
item = items[0]
350-
def g(obj):
351-
return obj[item]
352-
else:
353-
def g(obj):
354-
return tuple(obj[item] for item in items)
355-
return g
347+
def itemgetter(*items):
348+
if len(items) == 1:
349+
item = items[0]
350+
def g(obj):
351+
return obj[item]
352+
else:
353+
def g(obj):
354+
return tuple(obj[item] for item in items)
355+
return g
356356

357357
The items can be any type accepted by the operand's :meth:`__getitem__`
358358
method. Dictionaries accept any hashable value. Lists, tuples, and

0 commit comments

Comments
 (0)