custom python list sorting,alist.sort(key=lambda x: x.foo)