From 18c2d126a9c8074e8ac4f8b7972d998000297322 Mon Sep 17 00:00:00 2001 From: JohnHBauer Date: Tue, 18 Jul 2017 13:46:15 -0500 Subject: [PATCH] extraneous sort in print_query Alternatively, print in sorted order, e.g. def print_table(D): K = D.keys() K.sort() n = max(map(len, K)) # Length of longest key for k in K: print("%*s = %s" % (-n, k, D[k])) --- py/candle_db | 1 - 1 file changed, 1 deletion(-) diff --git a/py/candle_db b/py/candle_db index c73dd3b..2d32706 100755 --- a/py/candle_db +++ b/py/candle_db @@ -130,7 +130,6 @@ def print_result(result): def print_table(D): K = D.keys() - K.sort() n = max(map(len, K)) # Length of longest key for (k,v) in D.iteritems(): print("%*s = %s" % (-n, k, v))