I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
elif color == BLUE:
x = term.BLUE
elif color == GREEN:
x = term.GREEN
elif color == YELLOW:
x = term.YELLOW
Lars Johansen wrote:
I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
elif color == BLUE:
x = term.BLUE
elif color == GREEN:
x = term.GREEN
elif color == YELLOW:
Lars Johansen a écrit :
I have a function that looks like this:
def Chooser(color):
mode=pedant
Bad naming (noun instead of a verb) and not conformant to PEP 08
(function names should be all_lower)
/mode
if color == RED:
x = term.RED
elif color == BLUE:
On Dec 7, 9:37 am, Lars Johansen [EMAIL PROTECTED] wrote:
I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
elif color == BLUE:
x = term.BLUE
elif color == GREEN:
x =
Lars Johansen wrote:
I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
elif color == BLUE:
x = term.BLUE
elif color == GREEN:
x = term.GREEN
elif color == YELLOW:
On Dec 7, 10:37 am, Lars Johansen [EMAIL PROTECTED] wrote:
I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
elif color == BLUE:
x = term.BLUE
elif color == GREEN:
x =
On Fri, 07 Dec 2007 09:37:22 +0100, Lars Johansen wrote:
I have a function that looks like this:
def Chooser(color):
if color == RED:
x = term.RED
[snip]
Wouldn there been easier if I could just skip all the *if's and just
return term.color, however this gives a