[Zope3-checkins] RE: SVN: Zope3/trunk/src/bugtracker/browser/tracker.py Sort bugs by keys in overview.html

roger at projekt01.ch roger at projekt01.ch
Wed May 31 06:41:16 EDT 2006


Thanks, it's changed

Regards
Roger Ineichen
 

> -----Original Message-----
> From: Florent Guillaume [mailto:fg at nuxeo.com] 
> Sent: Wednesday, May 31, 2006 12:12 PM
> To: Roger Ineichen
> Cc: zope3-checkins at zope.org
> Subject: Re: SVN: 
> Zope3/trunk/src/bugtracker/browser/tracker.py Sort bugs by 
> keys in overview.html
> 
> Roger Ineichen wrote:
> > Log message for revision 68403:
> >   Sort bugs by keys in overview.html
> > 
> > Changed:
> >   U   Zope3/trunk/src/bugtracker/browser/tracker.py
> > 
> > -=-
> > Modified: Zope3/trunk/src/bugtracker/browser/tracker.py
> > ===================================================================
> > --- Zope3/trunk/src/bugtracker/browser/tracker.py	
> 2006-05-31 07:04:50 UTC (rev 68402)
> > +++ Zope3/trunk/src/bugtracker/browser/tracker.py	
> 2006-05-31 07:37:10 UTC (rev 68403)
> > @@ -206,11 +206,11 @@
> >          
> >          formatter = 
> self.request.locale.dates.getFormatter('dateTime', 'short')
> >          result = []
> > -        for name, bug in self.context.items():
> > +        items  = self.context.items()
> > +        for name, bug in sorted(items, lambda x, y: 
> cmp(int(x[0]), int(y[0]))):
> 
> Instead of using:
>    sorted(items, lambda x, y: cmp(int(x[0]), int(y[0]))) you 
> should use the much faster:
>    sorted(items, key=lambda x: int(x[0]))
> 
> Florent
> 
> -- 
> Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
> +33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com
> 



More information about the Zope3-Checkins mailing list