diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-12 12:57:57 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-12 12:57:57 +0300 |
commit | 4967f628f78f7648b582a2ae705bd13aede16a76 (patch) | |
tree | 0a15cf64738cd1a63d02e030fed749e24f682c5b /algorithms/impl/selection_sort.py | |
parent | fix licensing notices (diff) | |
download | sorting-algorithms-4967f628f78f7648b582a2ae705bd13aede16a76.tar.gz sorting-algorithms-4967f628f78f7648b582a2ae705bd13aede16a76.zip |
mostly Pylint fixes
Diffstat (limited to 'algorithms/impl/selection_sort.py')
-rw-r--r-- | algorithms/impl/selection_sort.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/algorithms/impl/selection_sort.py b/algorithms/impl/selection_sort.py index 0dbf4eb..ad4a420 100644 --- a/algorithms/impl/selection_sort.py +++ b/algorithms/impl/selection_sort.py @@ -21,10 +21,12 @@ _ALGORITHMS = [ SortingAlgorithm('selection_sort', 'Selection sort', selection_sort), ] -def _parse_args(args=sys.argv): - return list(map(int, args[1:])) +def _parse_args(args=None): + if args is None: + args = sys.argv[1:] + return list(map(int, args)) -def main(args=sys.argv): +def main(args=None): xs = _parse_args(args) print(selection_sort(list(xs))) |