Searched refs:cmp_to_key (Results 1 - 8 of 8) sorted by relevance
/third_party/python/Lib/test/ |
H A D | test_sort.py | 4 from functools import cmp_to_key namespace 18 raw.sort(key=cmp_to_key(compare)) 103 s.sort(key=cmp_to_key(lambda a, b: int(random.random() * 3) - 1)) 160 self.assertRaises(ValueError, L.sort, key=cmp_to_key(mutating_cmp)) 165 self.assertRaises(ValueError, L.sort, key=cmp_to_key(mutating_cmp)) 180 copy.sort(key=cmp_to_key(my_cmp)) 256 data.sort(key=cmp_to_key(my_cmp), reverse=True) 257 copy1.sort(key=cmp_to_key(my_cmp_reversed)) 349 [cmp_to_key(lambda x,y: x<y)(x) for x in range(100)]]
|
H A D | list_tests.py | 7 from functools import cmp_to_key namespace 453 u.sort(key=cmp_to_key(revcmp)) 466 z.sort(key=cmp_to_key(myComparison)) 479 key=cmp_to_key(selfmodifyingComparison))
|
H A D | test_functools.py | 869 key = self.cmp_to_key(cmp1) 876 key = self.cmp_to_key(cmp2) 885 key = self.cmp_to_key(mycmp=cmp1) 893 key = self.cmp_to_key() # too few args 895 key = self.cmp_to_key(cmp1, None) # too many args 896 key = self.cmp_to_key(cmp1) 905 key = self.cmp_to_key(cmp1) 920 key = self.cmp_to_key(mycmp=cmp1) 926 self.assertEqual(sorted(range(5), key=self.cmp_to_key(mycmp)), 934 values = sorted(values, key=self.cmp_to_key(mycm 950 cmp_to_key = c_functools.cmp_to_key global() variable in TestCmpToKeyC 961 cmp_to_key = staticmethod(py_functools.cmp_to_key) global() variable in TestCmpToKeyPy [all...] |
/third_party/python/Lib/ |
H A D | functools.py | 13 'total_ordering', 'cache', 'cmp_to_key', 'lru_cache', 'reduce', 203 ### cmp_to_key() function converter 206 def cmp_to_key(mycmp): function 226 from _functools import cmp_to_key namespace
|
H A D | pstats.py | 30 from functools import cmp_to_key namespace 269 stats_list.sort(key=cmp_to_key(TupleComp(sort_tuple).compare))
|
/third_party/node/tools/gyp/pylib/gyp/ |
H A D | xcodeproj_file.py | 141 from functools import cmp_to_key namespace 1490 self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y)) 2898 key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)), 3125 key=cmp_to_key(
|
/third_party/node/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ |
H A D | xcodeproj_file.py | 141 from functools import cmp_to_key namespace 1490 self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y)) 2899 key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)), 3126 key=cmp_to_key(
|
/third_party/python/Lib/unittest/ |
H A D | loader.py | 239 testFnNames.sort(key=functools.cmp_to_key(self.sortTestMethodsUsing))
|
Completed in 16 milliseconds