From 4895103037017d7441a00fb7bf14ab5366014f27 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 10 Dec 2015 02:06:17 +0000 Subject: [PATCH] Use dict comprehension instead of dict([...]) --- solve_threesixty/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solve_threesixty/api.py b/solve_threesixty/api.py index 9b116cb..c8bd197 100644 --- a/solve_threesixty/api.py +++ b/solve_threesixty/api.py @@ -19,7 +19,7 @@ def clearEmpties(d): """ Removes empty values from a dict. """ - return dict([(k, v) for k, v in d.items() if v and len(v) > 0]) + return {k: v for k, v in d.items() if v and len(v) > 0} logger = logging.getLogger('solve_threesixty')