lesson5

Yes it worked when I ran in CLI that's where I pasted the example from.

Sent from my iPhone

> On Sep 25, 2014, at 4:01 PM, Chad Heuschober <notifications@github.com> wrote:
> 
> In task_01.py:
> 
> > +
> > +    Examples:
> > +        >>> task_01.bool_to_str(False)
> > +        'No'
> > +        >>> task_01.bool_to_str(True, short=True)
> > +        'Y'
> > +
> > +    """
> > +    if bvalue == True and short == True:
> > +        return 'Y'
> > +    elif bvalue == True and short == False:
> > +        return 'Yes'
> > +    elif bvalue == False and short == True:
> > +        return 'N'
> > +    else:
> > +        return 'No'
> Nice start!
> 
> Hopefully you can see the syntax error on the test server. It's fairly explicit, you mixed up assignment = with and equality test ==. I'm a bit surprised you committed it, though. Did you try running it locally first?
> 
> A few other comments since I'm here: Under the args, generally you want to list just the name of the arg and its type:
> 
> eg,
> Args:
> bvalue (boolean): ....
> short (boolean, optional): ... Default: False.
> 
> You don't have to have a separate section for defaults as long as you include it in the args.
> 
> Another thing to keep in mind is that while multiple returns are possible, they're generally frowned upon. See if you can capture your return in a variable and return only once.
> 
> —
> Reply to this email directly or view it on GitHub.