def _sort_by_score(scoring, items_list):
    num_items = len(items_list)

def score(entry):
    return scoring(num_items, entry[0])
In Python, partial function application (currying) versus explicit function definition