Lines Matching refs:itemgetter
12 from operator import itemgetter
535 .. function:: itemgetter(item)
536 itemgetter(*items)
542 * After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``.
544 * After ``g = itemgetter(2, 5, 3)``, the call ``g(r)`` returns
549 def itemgetter(*items):
563 >>> itemgetter(1)('ABCDEFG')
565 >>> itemgetter(1,3,5)('ABCDEFG')
567 >>> itemgetter(slice(2,None))('ABCDEFG')
575 Example of using :func:`itemgetter` to retrieve specific fields from a
579 >>> getcount = itemgetter(1)