diff mercurial/util.py @ 8209:a1a5a57efe90

replace util.sort with sorted built-in This is marginally faster for small and moderately-sized lists
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Apr 2009 16:50:44 -0500
parents dd8d5be57d65
children 46293a0c7e9f
line wrap: on
line diff
--- a/mercurial/util.py	Sun Apr 26 16:50:44 2009 -0500
+++ b/mercurial/util.py	Sun Apr 26 16:50:44 2009 -0500
@@ -211,12 +211,6 @@
     """return true if a string is binary data"""
     return bool(s and '\0' in s)
 
-def sort(l):
-    if not isinstance(l, list):
-        l = list(l)
-    l.sort()
-    return l
-
 def increasingchunks(source, min=1024, max=65536):
     '''return no less than min bytes per chunk while data remains,
     doubling min after each chunk until it reaches max'''