meld r1234 - trunk



Author: vincele
Date: Sun Mar  8 17:22:42 2009
New Revision: 1234
URL: http://svn.gnome.org/viewvc/meld?rev=1234&view=rev

Log:
No need for an intermediary list() creation, as sorted
works on an iterable, and a set is an iterable...


Modified:
   trunk/dirdiff.py

Modified: trunk/dirdiff.py
==============================================================================
--- trunk/dirdiff.py	(original)
+++ trunk/dirdiff.py	Sun Mar  8 17:22:42 2009
@@ -401,7 +401,7 @@
                     def add(self, pane, items):
                         self.items.extend(items)
                     def get(self):
-                        return [(i,) * self.n for i in sorted(list(set(self.items)))]
+                        return [(i,) * self.n for i in sorted(set(self.items))]
             else:
                 canonicalize = lambda x : x.lower()
                 class accum(object):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]