On Sat, Apr 10, 2004 at 08:42:42AM +0800, Ng Pheng Siong wrote:
>     def rev_category_entry_items(self,category_id,start=0,count=-1,consider_mode
> ration = 1):
>         #Return list of Entry.
>         l = []
>         list_c = len(self.entry_list)
>         #if count == -1:
>         #    count = list_c
>         actual_count = count
>         count = list_c
>         for c in range(start,start+count):

On reflection my rewrite is a brute-force approach. It is better to
start retrieving the entries from the end and stop when the number of
entries retrieved == count.

Cheers.

-- 
Ng Pheng Siong <[EMAIL PROTECTED]> 

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- ZServerSSL/Zope Windows Installers
_______________________________________________
COREblog-en mailing list
[EMAIL PROTECTED]
http://munin.nbi.dk/cgi-bin/mailman/listinfo/coreblog-en

Reply via email to