Exemple #1
0
def filter_sort_meth_basic( j, x, value ) :
    z = sorted(x.iteritems(), key=lambda (k,v): (v,k))

    if get_debug() :
        for i in z :
            debug("\t %s %f" %(i[0].get_info(), i[1]))

    if z[:1][0][1] > value :
        return []

    return z[:1]
def filter_sort_meth_string(j, x, value):
    z = sorted(x.iteritems(), key=lambda (k, v): (v, k))

    if get_debug():
        for i in z:
            debug("\t %s %f" % (i[0].get_info(), i[1]))

    if z[:1][0][1] > value:
        return []

    return z[:1]
Exemple #3
0
def filter_sort_meth_basic( j, x, value ):
    z = sorted(iter(x.items()), key=lambda k_v1: (k_v1[1],k_v1[0]))

    if get_debug():
        for i in z:
            debug("\t %s %f" %(i[0].get_info(), i[1]))

    if z[:1][0][1] > value:
        return []

    return z[:1]