I have to sort a list with multiple attributes. I can do that in ascending order for ALL attributes easily with
L.sort(key=operator.attrgetter(attribute))....
but the problem is, that I have to use mixed configurations for ascending/descending... I have to "imitate" a bit the SQL Order By where you can do something like name ASC, year DESC.
Is there a way to do this easily in Python without having to implement a custom compare function?
 
     
     
     
    