1. Ronald Oussoren
  2. pyobjc

Commits

Ronald Oussoren  committed 26176b6

Correct keyword argument name

  • Participants
  • Parent commits 97401b1
  • Branches default

Comments (0)

Files changed (1)

File pyobjc-core/Lib/objc/_convenience_nsarray.py

View file
  • Ignore whitespace
 
 
 if sys.version_info[0] == 2:  # pragma: no 3.x cover
-    def nsarray_sort(self, cmp=cmp, key=None, reverse=False):
+    def nsarray_sort(self, cmpfunc=cmp, key=None, reverse=False):
         if key is None:
             if reverse:
                 def sort_func(a, b, cmp):
                 def sort_func(a, b, cmp):
                     return cmp(key(a), key(b))
 
-        self.sortUsingFunction_context_(sort_func, cmp)
+        self.sortUsingFunction_context_(sort_func, cmpfunc)
 
 else:  # pragma: no 2.x cover
     def nsarray_sort(self, key=lambda x: x, reverse=False):