Commit 0fe20731 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

Make NiceSort treat integers well

NiceSort is invoked on arrays that may contain strings, but in other
situations can contain ints as well. As this surprisingly makes sense,
add a tiny modification to make NiceSort work in these conditions.
Signed-off-by: default avatarHrvoje Ribicic <>
Reviewed-by: default avatarJose A. Lopes <>
parent eeeed365
......@@ -110,7 +110,7 @@ def NiceSortKey(value):
return [_NiceSortTryInt(grp)
for grp in _SORTER_RE.match(value).groups()]
for grp in _SORTER_RE.match(str(value)).groups()]
def NiceSort(values, key=None):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment