Larry Martell <larry.mart...@gmail.com> writes:
>         def GetObjKey(a):
>             return a[2]

This function is called operator.itemgetter:

    from operator import itemgetter
    sorted(a + b + c, key=itemgetter(2))

> So for example, if my initial data was this (I'll only show the fields
> involved with the sort - the first number is a[2] above and the second
> is the new additional sorting field, only present in a)

  sorted(sorted(a, key=itemgetter(5)) + b + c, key = itemgetter(2))

or whatever the new field (instead of 5) is for a.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to