diff babel/messages/mofile.py @ 250:194f927d8c5a

add a __cmp__ to Message that correctly sorts by id, taking into account plurals thanks zepolen
author pjenvey
date Mon, 13 Aug 2007 00:59:09 +0000
parents bf9579c4b0ee
children a7dff175b14f
line wrap: on
line diff
--- a/babel/messages/mofile.py
+++ b/babel/messages/mofile.py
@@ -66,7 +66,7 @@
     messages = list(catalog)
     if not use_fuzzy:
         messages[1:] = [m for m in messages[1:] if not m.fuzzy]
-    messages.sort(lambda x,y: cmp(x.id, y.id))
+    messages.sort()
 
     ids = strs = ''
     offsets = []
Copyright (C) 2012-2017 Edgewall Software