Searched refs:itemgetter (Results 1 – 25 of 34) sorted by relevance
12
/third_party/boost/libs/numeric/odeint/ |
D | fix-copyright.py | 5 from operator import itemgetter 21 alldates = map(itemgetter(1), au) 22 aup = sorted(au + map(lambda a: (a, None), previous), key=itemgetter(0)) 23 for author, records in groupby(aup, itemgetter(0)): 24 dates = filter(None, map(itemgetter(1), records)) 32 return map(itemgetter(1), sorted(f()))
|
/third_party/python/Lib/test/ |
D | test_operator.py | 388 f = operator.itemgetter(2) 393 f = operator.itemgetter(10) 399 self.assertRaises(SyntaxError, operator.itemgetter(42), C()) 401 f = operator.itemgetter('name') 403 self.assertRaises(TypeError, operator.itemgetter) 406 f = operator.itemgetter('key') 408 f = operator.itemgetter('nonkey') 413 getcount = operator.itemgetter(1) 420 self.assertEqual(operator.itemgetter(2,10,5)(data), ('2', '10', '5')) 421 self.assertRaises(TypeError, operator.itemgetter(2, 'x', 5), data) [all …]
|
D | test_heapq.py | 10 from operator import itemgetter 188 for key in [None, itemgetter(0), itemgetter(1), itemgetter(1, 0)]:
|
/third_party/python/Doc/library/ |
D | operator.rst | 14 from operator import itemgetter, iadd 294 .. function:: itemgetter(item) 295 itemgetter(*items) 301 * After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``. 303 * After ``g = itemgetter(2, 5, 3)``, the call ``g(r)`` returns 308 def itemgetter(*items): 322 >>> itemgetter(1)('ABCDEFG') 324 >>> itemgetter(1, 3, 5)('ABCDEFG') 326 >>> itemgetter(slice(2, None))('ABCDEFG') 329 >>> itemgetter('rank')(soldier) [all …]
|
D | bisect.rst | 201 >>> data.sort(key=lambda r: r[1]) # Or use operator.itemgetter(1).
|
D | itertools.rst | 913 return map(next, map(operator.itemgetter(1), groupby(iterable, key)))
|
/third_party/python/Tools/scripts/ |
D | analyze_dxp.py | 92 result.sort(key=operator.itemgetter(2), reverse=True) 112 result.sort(key=operator.itemgetter(2), reverse=True)
|
/third_party/python/Doc/howto/ |
D | sorting.rst | 105 :mod:`operator` module has :func:`~operator.itemgetter`, 112 >>> from operator import itemgetter, attrgetter 114 >>> sorted(student_tuples, key=itemgetter(2)) 125 >>> sorted(student_tuples, key=itemgetter(1,2)) 140 >>> sorted(student_tuples, key=itemgetter(2), reverse=True) 156 >>> sorted(data, key=itemgetter(0)) 322 >>> standard_way = sorted(data, key=itemgetter(0), reverse=True) 323 >>> double_reversed = list(reversed(sorted(reversed(data), key=itemgetter(0))))
|
/third_party/mindspore/mindspore/lite/tools/dataset/cropper/ |
D | build_lib.py | 20 from operator import itemgetter 82 selected_files = itemgetter(*selected_entries)(dependencies_dict)
|
/third_party/python/Tools/ssl/ |
D | make_ssl_data.py | 119 args.reasons = sorted(reasons, key=operator.itemgetter(0, 3))
|
/third_party/python/Lib/ |
D | statistics.py | 139 from operator import itemgetter 600 maxcount, mode_items = next(groupby(counts, key=itemgetter(1)), (0, [])) 601 return list(map(itemgetter(0), mode_items))
|
D | operator.py | 265 class itemgetter: class
|
/third_party/skia/third_party/externals/jinja2/ |
D | lexer.py | 10 from operator import itemgetter 263 lineno, type, value = (property(itemgetter(x)) for x in range(3))
|
/third_party/node/tools/inspector_protocol/jinja2/ |
D | lexer.py | 19 from operator import itemgetter 235 lineno, type, value = (property(itemgetter(x)) for x in range(3))
|
/third_party/jinja2/ |
D | lexer.py | 10 from operator import itemgetter 263 lineno, type, value = (property(itemgetter(x)) for x in range(3))
|
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/bloat/ |
D | bloat.py | 293 key=operator.itemgetter(1))[0])
|
/third_party/python/Misc/NEWS.d/ |
D | 3.5.0b1.rst | 284 attrgetter, itemgetter and methodcaller objects in the operator module now
|
D | 3.5.2rc1.rst | 743 itemgetter, attrgetter and methodcaller objects no longer silently ignore
|
/third_party/python/Doc/whatsnew/ |
D | 2.4.rst | 1199 ``attrgetter(attr)`` and ``itemgetter(index)``. Both functions return 1205 >>> map(operator.itemgetter(0), L) 1207 >>> map(operator.itemgetter(1), L) 1209 >>> sorted(L, key=operator.itemgetter(1)) # Sort list by second tuple item
|
/third_party/mindspore/mindspore/numpy/ |
D | array_ops.py | 1103 key=operator.itemgetter(1))]
|
/third_party/python/Tools/stringbench/ |
D | stringbench.py | 1436 operator.itemgetter(0)):
|
/third_party/python/Lib/email/ |
D | _header_value_parser.py | 74 from operator import itemgetter 744 parts = sorted(parts, key=itemgetter(0))
|
/third_party/python/Lib/collections/ |
D | __init__.py | 37 from operator import itemgetter as _itemgetter
|
/third_party/python/Lib/lib2to3/tests/ |
D | test_fixers.py | 6 from operator import itemgetter 1841 a = "import %s" % ", ".join(map(itemgetter(0), changes))
|
/third_party/skia/third_party/externals/brotli/research/ |
D | brotlidump.py | 12 from operator import itemgetter, methodcaller
|
12