From e4ecd23f0d7c83388966000a1502e86051b3ab4e Mon Sep 17 00:00:00 2001 From: Bob Farrell Date: Mon, 17 Nov 2008 11:06:56 +0000 Subject: [PATCH] Minor syntax clean-up in make_colours Using a dict literal instead of repeated assignment --- bpython/cli.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bpython/cli.py b/bpython/cli.py index 7631b49..e345e2d 100644 --- a/bpython/cli.py +++ b/bpython/cli.py @@ -145,17 +145,18 @@ def make_colours(): j = -1 curses.init_pair(i+1, i % 8, j) - c = {} # blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default: - c["k"] = 0 - c["r"] = 1 - c["g"] = 2 - c["y"] = 3 - c["b"] = 4 - c["m"] = 5 - c["c"] = 6 - c["w"] = 7 - c["d"] = -1 + c = { + 'k' : 0, + 'r' : 1, + 'g' : 2, + 'y' : 3, + 'b' : 4, + 'm' : 5, + 'c' : 6, + 'w' : 7, + 'd' : -1, + } return c