Home
last modified time | relevance | path

Searched refs:itemgetter (Results 1 – 25 of 62) sorted by relevance

123

/external/autotest/server/site_tests/firmware_FAFTRPC/
Dfirmware_FAFTRPC.py137 if isinstance(old_param, operator.itemgetter):
523 (operator.itemgetter("dev_boot_usb"),
557 (operator.itemgetter("temp_dir"), ),
600 (operator.itemgetter("gbb_flags"), ),
618 operator.itemgetter(
628 operator.itemgetter(
1123 (operator.itemgetter('gbb_flags'), ),
1124 (operator.itemgetter('gbb_flags'),
/external/python/cpython3/Lib/test/
Dtest_operator.py376 f = operator.itemgetter(2)
381 f = operator.itemgetter(10)
387 self.assertRaises(SyntaxError, operator.itemgetter(42), C())
389 f = operator.itemgetter('name')
391 self.assertRaises(TypeError, operator.itemgetter)
394 f = operator.itemgetter('key')
396 f = operator.itemgetter('nonkey')
401 getcount = operator.itemgetter(1)
408 self.assertEqual(operator.itemgetter(2,10,5)(data), ('2', '10', '5'))
409 self.assertRaises(TypeError, operator.itemgetter(2, 'x', 5), data)
[all …]
Dtest_heapq.py9 from operator import itemgetter
187 for key in [None, itemgetter(0), itemgetter(1), itemgetter(1, 0)]:
/external/python/cpython2/Lib/
Dheapq.py133 from operator import itemgetter
427 return map(itemgetter(0), result) # undecorate
433 return map(itemgetter(2), result) # undecorate
465 return map(itemgetter(0), result) # undecorate
471 return map(itemgetter(2), result) # undecorate
Dpyclbr.py46 from operator import itemgetter
336 methods = sorted(obj.methods.iteritems(), key=itemgetter(1))
Dcollections.py21 from operator import itemgetter as _itemgetter, eq as _eq
/external/python/cpython3/Doc/library/
Doperator.rst14 from operator import itemgetter, iadd
290 .. function:: itemgetter(item)
291 itemgetter(*items)
297 * After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``.
299 * After ``g = itemgetter(2, 5, 3)``, the call ``g(r)`` returns
304 def itemgetter(*items):
318 >>> itemgetter('name')({'name': 'tu', 'age': 18})
320 >>> itemgetter(1)('ABCDEFG')
322 >>> itemgetter(1,3,5)('ABCDEFG')
324 >>> itemgetter(slice(2,None))('ABCDEFG')
[all …]
/external/llvm-project/llvm/tools/opt-viewer/
Dopt-stats.py71 for (passname, count) in sorted(bypass.items(), key=operator.itemgetter(1),
76 for (name, count) in sorted(byname.items(), key=operator.itemgetter(1),
/external/python/cpython3/Tools/scripts/
Danalyze_dxp.py92 result.sort(key=operator.itemgetter(2), reverse=True)
112 result.sort(key=operator.itemgetter(2), reverse=True)
/external/python/cpython2/Tools/scripts/
Danalyze_dxp.py93 result.sort(key=operator.itemgetter(2), reverse=True)
113 result.sort(key=operator.itemgetter(2), reverse=True)
/external/python/cpython2/Lib/test/
Dtest_operator.py418 f = operator.itemgetter(2)
423 f = operator.itemgetter(10)
429 self.assertRaises(SyntaxError, operator.itemgetter(42), C())
431 f = operator.itemgetter('name')
433 self.assertRaises(TypeError, operator.itemgetter)
436 f = operator.itemgetter('key')
438 f = operator.itemgetter('nonkey')
443 getcount = operator.itemgetter(1)
450 self.assertEqual(operator.itemgetter(2,10,5)(data), ('2', '10', '5'))
451 self.assertRaises(TypeError, operator.itemgetter(2, 'x', 5), data)
/external/python/cpython3/Doc/howto/
Dsorting.rst93 :mod:`operator` module has :func:`~operator.itemgetter`,
98 >>> from operator import itemgetter, attrgetter
100 >>> sorted(student_tuples, key=itemgetter(2))
109 >>> sorted(student_tuples, key=itemgetter(1,2))
122 >>> sorted(student_tuples, key=itemgetter(2), reverse=True)
136 >>> sorted(data, key=itemgetter(0))
284 >>> standard_way = sorted(data, key=itemgetter(0), reverse=True)
285 >>> double_reversed = list(reversed(sorted(reversed(data), key=itemgetter(0))))
/external/python/cpython2/Doc/library/
Doperator.rst12 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
[all …]
/external/python/cpython2/Doc/howto/
Dsorting.rst92 module has :func:`operator.itemgetter`, :func:`operator.attrgetter`, and
97 >>> from operator import itemgetter, attrgetter
99 >>> sorted(student_tuples, key=itemgetter(2))
108 >>> sorted(student_tuples, key=itemgetter(1,2))
131 >>> sorted(student_tuples, key=itemgetter(2), reverse=True)
145 >>> sorted(data, key=itemgetter(0))
284 >>> standard_way = sorted(data, key=itemgetter(0), reverse=True)
285 >>> double_reversed = list(reversed(sorted(reversed(data), key=itemgetter(0))))
/external/arm-trusted-firmware/tools/memory/
Dprint_memory_map.py60 address_list.sort(key=operator.itemgetter(0))
/external/clang/utils/analyzer/
DSumTimerInfo.py12 from operator import itemgetter
/external/llvm/utils/
Dschedcover.py34 ordered_table = sorted(table.items(), key=operator.itemgetter(0))
/external/llvm-project/llvm/utils/
Dschedcover.py39 ordered_table = sorted(table.items(), key=operator.itemgetter(0))
/external/python/cpython3/Lib/
Dstatistics.py112 from operator import itemgetter
578 maxcount, mode_items = next(groupby(counts, key=itemgetter(1)), (0, []))
579 return list(map(itemgetter(0), mode_items))
Doperator.py265 class itemgetter: class
/external/python/cpython3/Lib/importlib/
Dmetadata.py317 section: list(map(operator.itemgetter('line'), results))
319 itertools.groupby(section_pairs, operator.itemgetter('section'))
/external/autotest/site_utils/
Dgenerate_test_report574 tests = sorted(self._results, key=operator.itemgetter('testdir'),
576 tests = sorted(tests, key=operator.itemgetter('timestamp'))
578 tests = sorted(self._results, key=operator.itemgetter('testdir'))
/external/python/jinja/src/jinja2/
Dlexer.py9 from operator import itemgetter
246 lineno, type, value = (property(itemgetter(x)) for x in range(3))
/external/libchrome/third_party/jinja2/
Dlexer.py19 from operator import itemgetter
235 lineno, type, value = (property(itemgetter(x)) for x in range(3))
/external/swiftshader/third_party/subzero/bloat/
Dbloat.py293 key=operator.itemgetter(1))[0])

123