Skip to content

Commit 236a504

Browse files
committed
Minor syntax clean-up in make_colours
Using a dict literal instead of repeated assignment committer: Bob Farrell <robertanthonyfarrell@gmail.com>
1 parent b06fa08 commit 236a504

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎bpython/cli.py‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,18 @@ def make_colours():
145145
j = -1
146146
curses.init_pair(i+1, i % 8, j)
147147

148-
c = {}
149148
# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default:
150-
c["k"] = 0
151-
c["r"] = 1
152-
c["g"] = 2
153-
c["y"] = 3
154-
c["b"] = 4
155-
c["m"] = 5
156-
c["c"] = 6
157-
c["w"] = 7
158-
c["d"] = -1
149+
c = {
150+
'k' : 0,
151+
'r' : 1,
152+
'g' : 2,
153+
'y' : 3,
154+
'b' : 4,
155+
'm' : 5,
156+
'c' : 6,
157+
'w' : 7,
158+
'd' : -1,
159+
}
159160
return c
160161

161162

0 commit comments

Comments
 (0)