Sorting a list of classes
lexberezhny
lexberezhny at email.msn.com
Mon Apr 24 00:08:49 EDT 2000
If i have a python list of classes, can i do something like classList.sort()
and how can i control this behavior within the classes. ie
i have a address book, and a have a class called 'Person', and it has an
attribute Person.Name, so i have a list of 'Person's how can i sort the
list, and maybe sort it by name? do i have to write my own function or can i
use list.sort() some how?
thanks,
lex
More information about the Python-list
mailing list