Custom Python list sorting,alist.sort(key=lambda x: x.foo)