13 Aug
2002
13 Aug
'02
12:29 a.m.
Hello, Since I wanted to have only the 5 last entries of a folder containing news, i did this little script and used it in a ZPT : sorted_lst = sequence.sort(lst, (('date', 'cmp', 'desc'), ('titre', 'nocase', 'asc'))) if len(sorted_lst) <= 5 : return sorted_lst else : return sorted_lst[0:5] It works well, I've got what I want ... But I wonder why should I use sorted_lst[0:5] to have 5 elements since there is in fact 6 elements in it ?? I suppose sorted_lst[0] is some kind of a dummy element to stock some informations ... Am I right ? -- (°> Nicolas Évrard / ) Liège - Belgique ^^