Ben Finney <[email protected]> writes: > So how should I be sorting a list with entries of “unequal types” such > that it will work in Python 3?
Um, what ordering do you want? Basically you have to write a custom key
function (they removed the option of writing a comparison function).
Maybe something like
foo.sort(key=lambda x: (type(x), x))
would be enough to fool the sorting function? I don't have python 3
so I haven't tried it.
--
http://mail.python.org/mailman/listinfo/python-list
