[Zope3-checkins] Re: SVN:
Zope3/trunk/src/bugtracker/browser/tracker.py Sort bugs
by keys in overview.html
Florent Guillaume
fg at nuxeo.com
Wed May 31 06:12:25 EDT 2006
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