aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index 37c1d6d5..6a056144 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -162,7 +162,7 @@ class SampleList(object):
return first_attr_col
-def natural_sort(list, key=lambda s: s):
+def natural_sort(a_list, key=lambda s: s):
"""
Sort the list into natural alphanumeric order.
"""
@@ -170,4 +170,8 @@ def natural_sort(list, key=lambda s: s):
def convert(text): return int(text) if text.isdigit() else text
return lambda s: [convert(c) for c in re.split('([0-9]+)', key(s))]
sort_key = get_alphanum_key_func(key)
- list.sort(key=sort_key) \ No newline at end of file
+
+ sorted_list=sorted(a_list,key=sort_key)
+
+ return sorted_list
+ \ No newline at end of file