Source

suds python 3 patches / sort

Full commit
# HG changeset patch
# Parent 30b3e18aa37d8c7cc8202ffb37584c63fe1059f2
use key instead of cmp function

cmp functions for sorting are deprecated and have been dropped in Python 3.
Defining a key function is the alternative (and available since Python 2.4)

diff --git a/suds/servicedefinition.py b/suds/servicedefinition.py
--- a/suds/servicedefinition.py
+++ b/suds/servicedefinition.py
@@ -144,8 +144,7 @@
             if t in self.types: continue
             item = (t, t)
             self.types.append(item)
-        tc = lambda x,y: cmp(x[0].name, y[0].name)
-        self.types.sort(cmp=tc)
+        self.types.sort(key=lambda x: x[0].name)
 
     def nextprefix(self):
         """