changeset 1439:4fc836cd3ba7

py2.3 fix to sorted (finally :))
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Mon, 21 Aug 2006 12:15:22 +0200
parents 78f636ab2490
children f127f9e09608
files MoinMoin/support/__init__.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/support/__init__.py	Mon Aug 21 12:11:57 2006 +0200
+++ b/MoinMoin/support/__init__.py	Mon Aug 21 12:15:22 2006 +0200
@@ -16,6 +16,11 @@
 except NameError:
     def sorted(l, *args, **kw):
         l = l[:]
+        # py2.3 is a bit different
+        if 'cmp' in kw:
+            kw['cmpfunc'] = kw['cmp']
+            del kw['cmp']
+
         l.sort(*args, **kw)
         return l