MCPcopy Create free account
hub / github.com/ActiveState/code / sort

Method sort

recipes/Python/440656_List_mixin/recipe-440656.py:191–194  ·  view source on GitHub ↗
(self, cmpfunc=None)

Source from the content-addressed store, hash-verified

189 # Define sort() as appropriate for the Python version.
190 if sys.version_info[:3] < (2, 4, 0):
191 def sort(self, cmpfunc=None):
192 ans = list(self)
193 ans.sort(cmpfunc)
194 self[:] = ans
195 else:
196 def sort(self, cmpfunc=None, key=None, reverse=False):
197 ans = list(self)

Callers 15

propsFunction · 0.45
recipe-577247.jsFile · 0.45
convexHullFunction · 0.45
sortTaskFunction · 0.45
xtagsMethod · 0.45
xmergeFunction · 0.45
hullsFunction · 0.45
recipe-437116.pyFile · 0.45
__call__Method · 0.45
getSmallestMethod · 0.45
getLargestMethod · 0.45
getOldestMethod · 0.45

Calls 1

listClass · 0.85

Tested by 1

test_completion_statsFunction · 0.36