will bring this question up again.
coding an application where i put information into a list(language python).
but before i really put the information into the list i would like to sort it in another way then just the "append" way.
Since every item will be put last into the list i would really like to order it by A-Z or Z-A or whatever.
i tried(written from my head):
items = ListItems()
item.Label("test")
items.append(item)
items.sort()
sorted(items, key=attrgetter('GetLabel'))
but none of the 2 last entries will successfully change the order of the list.
Does anyone know any way to sort the items in other way then the "append"-way?
can also say that neither items.insert(item, 0) work :S. kind of wierd since its included in pyhon 2.4


Reply With Quote

Bookmarks