/external/python/cpython3/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))
|
H A D | list_tests.py | 7 from functools import cmp_to_key namespace 502 u.sort(key=cmp_to_key(revcmp)) 515 z.sort(key=cmp_to_key(myComparison)) 528 key=cmp_to_key(selfmodifyingComparison))
|
H A D | test_functools.py | 811 key = self.cmp_to_key(cmp1) 818 key = self.cmp_to_key(cmp2) 827 key = self.cmp_to_key(mycmp=cmp1) 835 key = self.cmp_to_key() # too few args 837 key = self.cmp_to_key(cmp1, None) # too many args 838 key = self.cmp_to_key(cmp1) 847 key = self.cmp_to_key(cmp1) 862 key = self.cmp_to_key(mycmp=cmp1) 868 self.assertEqual(sorted(range(5), key=self.cmp_to_key(mycmp)), 876 values = sorted(values, key=self.cmp_to_key(mycm 892 cmp_to_key = c_functools.cmp_to_key variable in class:TestCmpToKeyC 896 cmp_to_key = staticmethod(py_functools.cmp_to_key) variable in class:TestCmpToKeyPy [all...] |
/external/selinux/python/sepolgen/src/sepolgen/ |
H A D | output.py | 134 rules.sort(key=util.cmp_to_key(rule_cmp)) 158 ras.sort(key=util.cmp_to_key(role_type_cmp))
|
H A D | util.py | 149 # cmp_to_key function is missing in python2.6 150 def cmp_to_key(mycmp): function 169 from functools import cmp_to_key namespace
|
/external/python/cpython2/Lib/ |
H A D | functools.py | 80 def cmp_to_key(mycmp): function
|
H A D | pstats.py | 28 from functools import cmp_to_key namespace 234 stats_list.sort(key=cmp_to_key(TupleComp(sort_tuple).compare))
|
/external/scapy/scapy/ |
H A D | compat.py | 21 def cmp_to_key(mycmp): function 22 # TODO remove me once all 'key=cmp_to_key(..)' has been fixed in utils6.py, automaton.py 28 list.sort(key=cmp_to_key(stg_cmp))
|
H A D | utils6.py | 76 cset.sort(key=cmp_to_key(cset_sort)) # Sort with global addresses first 156 candidate_set.sort(key=cmp_to_key(rfc3484_cmp), reverse=True)
|
H A D | automaton.py | 446 v.sort(key=cmp_to_key(lambda t1_f1,t2_f2: cmp(t1_f1[0],t2_f2[0]))) 451 v.sort(key=cmp_to_key(lambda c1,c2: cmp(c1.atmt_prio,c2.atmt_prio))) 453 actlst.sort(key=cmp_to_key(lambda c1,c2: cmp(c1.atmt_cond[condname], c2.atmt_cond[condname])))
|
/external/python/cpython3/Lib/ |
H A D | functools.py | 13 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial', 208 ### cmp_to_key() function converter 211 def cmp_to_key(mycmp): function 231 from _functools import cmp_to_key namespace
|
H A D | pstats.py | 28 from functools import cmp_to_key namespace 220 stats_list.sort(key=cmp_to_key(TupleComp(sort_tuple).compare))
|
/external/python/cpython2/Lib/unittest/ |
H A D | loader.py | 9 from functools import cmp_to_key as _CmpToKey
|
/external/libxml2/python/ |
H A D | generator.py | 806 def cmp_to_key(mycmp): function 943 flist = sorted(flist, key=cmp_to_key(functionCompare)) 1077 flist = sorted(flist, key=cmp_to_key(functionCompare))
|
/external/python/cpython2/Lib/test/ |
H A D | test_functools.py | 493 self.assertEqual(sorted(range(5), key=functools.cmp_to_key(mycmp)), 499 key = functools.cmp_to_key(mycmp)
|
/external/python/cpython3/Lib/unittest/ |
H A D | loader.py | 231 testFnNames.sort(key=functools.cmp_to_key(self.sortTestMethodsUsing))
|