From 4967f628f78f7648b582a2ae705bd13aede16a76 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 12 Jan 2017 12:57:57 +0300 Subject: mostly Pylint fixes --- algorithms/impl/median.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'algorithms/impl/median.py') diff --git a/algorithms/impl/median.py b/algorithms/impl/median.py index d19dec4..b48e511 100644 --- a/algorithms/impl/median.py +++ b/algorithms/impl/median.py @@ -47,10 +47,12 @@ _ALGORITHMS = [ Algorithm('median_heaps', 'Median value (using heaps)', calc_median_heaps), ] -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(calc_median_sorting(list(xs))) print(calc_median_heaps(list(xs))) -- cgit v1.2.3