From ea415b953caf783fa1b975ae0e8cf4af935d8e18 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 25 Jan 2020 01:08:50 -0800 Subject: [PATCH] Rename these key, value variables to give better context. --- search.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/search.py b/search.py index eea4560..d26408a 100644 --- a/search.py +++ b/search.py @@ -130,15 +130,15 @@ def search( # The value still needs to be a list so the upcoming any() / all() # receives an iterable as it expects. It just happens to be 1 tree. trees = {} - for (key, value) in terms.items(): - if value == []: - trees[key] = [] + for (term_type, term_expression) in terms.items(): + if term_expression == []: + trees[term_type] = [] continue - tree = ' '.join(value) + tree = ' '.join(term_expression) tree = expressionmatch.ExpressionTree.parse(tree) if not case_sensitive: tree.map(str.lower) - trees[key] = [tree] + trees[term_type] = [tree] terms = trees elif not case_sensitive: