Skip to content

Commit

Permalink
extraneous sort in print_query
Browse files Browse the repository at this point in the history
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]))
  • Loading branch information
JohnHBauer authored Jul 18, 2017
1 parent 0112d11 commit 18c2d12
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion py/candle_db
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 18c2d12

Please sign in to comment.