Daniel Holbach has proposed merging lp:~dholbach/loco-directory/612914 into 
lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)
Related bugs:
  #612914 reduce() of empty sequence with no initial value  
  https://bugs.launchpad.net/bugs/612914

-- 
https://code.launchpad.net/~dholbach/loco-directory/612914/+merge/31630
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~dholbach/loco-directory/612914 into lp:loco-directory.
=== modified file 'loco_directory/common/utils.py'
--- loco_directory/common/utils.py	2010-07-30 20:55:49 +0000
+++ loco_directory/common/utils.py	2010-08-03 11:45:54 +0000
@@ -7,6 +7,8 @@
     >>> reduce(lambda a,b: a.extend(b) or a, [[2,3],[6],[66,34]])
     [2, 3, 6, 66, 34]
     """
+    if not some_list:
+        return []
     return reduce(lambda a,b: a.extend(b) or a, some_list)
     
 

_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to