[Numpy-svn] r8130 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:03:14 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:03:14 -0600 (Sat, 20 Feb 2010)
New Revision: 8130

Modified:
   trunk/numpy/core/_internal.py
Log:
3K: core: sort using the key= method

Modified: trunk/numpy/core/_internal.py
===================================================================
--- trunk/numpy/core/_internal.py	2010-02-20 18:03:00 UTC (rev 8129)
+++ trunk/numpy/core/_internal.py	2010-02-20 18:03:14 UTC (rev 8130)
@@ -34,7 +34,7 @@
             title = None
         allfields.append((fname, format, num, title))
     # sort by offsets
-    allfields.sort(lambda x,y: cmp(x[2],y[2]))
+    allfields.sort(key=lambda x: x[2])
     names = [x[0] for x in allfields]
     formats = [x[1] for x in allfields]
     offsets = [x[2] for x in allfields]



More information about the Numpy-svn mailing list