From: Diane Trout Date: Fri, 20 Mar 2015 21:46:27 +0000 (-0700) Subject: use sorted on the iterator instead of an in-place sort X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=09a39cf1274184994fcb6feafe0d5831cb254eff use sorted on the iterator instead of an in-place sort --- diff --git a/htsworkflow/pipelines/retrieve_config.py b/htsworkflow/pipelines/retrieve_config.py index 26ff2d1..69d8558 100644 --- a/htsworkflow/pipelines/retrieve_config.py +++ b/htsworkflow/pipelines/retrieve_config.py @@ -408,8 +408,7 @@ def format_pooled_libraries(shared, library): return [shared] elif isinstance(sequences, dict): pooled = [] - multiplex_ids = sequences.keys() - multiplex_ids.sort(key=natural_sort_key) + multiplex_ids = sorted(sequences.keys(), key=natural_sort_key) for multiplex_id in multiplex_ids: sample = {} sample.update(shared)