meld r1252 - trunk/vc



Author: vincele
Date: Wed Mar 11 00:16:17 2009
New Revision: 1252
URL: http://svn.gnome.org/viewvc/meld?rev=1252&view=rev

Log:
Remove the use of reduce() builtin, the "right" way of
creating a space separated string from a list of strings,
is str.join(). It is more readable also.


Modified:
   trunk/vc/monotone.py

Modified: trunk/vc/monotone.py
==============================================================================
--- trunk/vc/monotone.py	(original)
+++ trunk/vc/monotone.py	Wed Mar 11 00:16:17 2009
@@ -127,7 +127,7 @@
                     # sort the list and reduce it from a list to a space seperated string.
                     mstate = stanza['status']
                     mstate.sort()
-                    mstate = reduce(lambda s1, s2: s1 + ' ' + s2, mstate)
+                    mstate = ' '.join(mstate)
 
                     if mstate in statemap:
                         if 'changes' in stanza:



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