Fix argument order in an example
This commit is contained in:
parent
881b4d15c4
commit
9518a04556
|
@ -167,7 +167,7 @@ Pattern::
|
|||
Typical contexts::
|
||||
|
||||
sort(studentrecords, key=attrgetter('gpa')) # set a sort field
|
||||
map(studentrecords, attrgetter('lastname')) # extract a field
|
||||
map(attrgetter('lastname'), studentrecords) # extract a field
|
||||
|
||||
Locating: ``grep lambda *.py``
|
||||
|
||||
|
|
Loading…
Reference in New Issue