Merge pull request #128 from saschanaz/versionkey-py3
Python 3: version_key() should return list
This commit is contained in:
@@ -38,4 +38,5 @@
|
|||||||
1.37.24
|
1.37.24
|
||||||
1.37.25
|
1.37.25
|
||||||
1.37.26
|
1.37.26
|
||||||
1.37.27
|
1.37.27
|
||||||
|
1.37.28
|
||||||
@@ -111,4 +111,5 @@
|
|||||||
1.37.24
|
1.37.24
|
||||||
1.37.25
|
1.37.25
|
||||||
1.37.26
|
1.37.26
|
||||||
1.37.27
|
1.37.27
|
||||||
|
1.37.28
|
||||||
2
emsdk
2
emsdk
@@ -1497,7 +1497,7 @@ def find_used_python():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def version_key(ver):
|
def version_key(ver):
|
||||||
return map(int, re.split('[._-]', ver))
|
return list(map(int, re.split('[._-]', ver)))
|
||||||
|
|
||||||
# A sort function that is compatible with both Python 2 and Python 3 using a custom comparison function.
|
# A sort function that is compatible with both Python 2 and Python 3 using a custom comparison function.
|
||||||
def python_2_3_sorted(arr, cmp):
|
def python_2_3_sorted(arr, cmp):
|
||||||
|
|||||||
Reference in New Issue
Block a user