From 668db21c3d258b5989963733054c9e66de9d89ee Mon Sep 17 00:00:00 2001 From: Orakaro Date: Tue, 6 May 2014 16:52:31 +0900 Subject: [PATCH] fix typo --- rainbowstream/colors.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rainbowstream/colors.py b/rainbowstream/colors.py index 84e3ad8..4a214d0 100644 --- a/rainbowstream/colors.py +++ b/rainbowstream/colors.py @@ -21,23 +21,23 @@ on_magenta = lambda x: colored(x, 'white', 'on_magenta', attrs=['bold']) on_cyan = lambda x: colored(x, 'white', 'on_cyan', attrs=['bold']) on_white = lambda x: colored(x, 'white', 'on_white', attrs=['bold']) -colors_shufle = [grey, red, green, yellow, blue, magenta, cyan] -background_shufle = [on_grey, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan] -cyc = itertools.cycle(colors_shufle[1:]) +colors_shuffle = [grey, red, green, yellow, blue, magenta, cyan] +background_shuffle = [on_grey, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan] +cyc = itertools.cycle(colors_shuffle[1:]) def order_rainbow(s): """ Print a string with ordered color with each character """ - c = [colors_shufle[i%7](s[i]) for i in xrange(len(s))] + c = [colors_shuffle[i%7](s[i]) for i in xrange(len(s))] return reduce(lambda x,y: x+y, c) def random_rainbow(s): """ Print a string with random color with each character """ - c = [random.choice(colors_shufle)(i) for i in s] + c = [random.choice(colors_shuffle)(i) for i in s] return reduce(lambda x,y: x+y, c) def Memoize(func): @@ -55,7 +55,7 @@ def Memoize(func): @Memoize def cycle_color(s): """ - Cycle the colors_shufle + Cycle the colors_shuffle """ return next(cyc)(s) -- 2.25.1