[Tutor] recursion surprise

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Jun 9 00:46:40 CEST 2013


On 08/06/2013 23:31, Jim Mooney wrote:
> On 8 June 2013 15:02, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
>
>>         return None #Python puts the default return here as you don't specify
>> it.
>
> I wasn't quite sure where to put that 'return None' since it wasn't
> aligned, so I tried a few different ways, did the below and it worked.
> Is that what you meant or am I still confused ;')
>

There's only one place it can go, it should have been aligned directly 
under "num = addone(num + 1)".  Shift it to the left or right gives you 
a syntax error.

-- 
"Steve is going for the pink ball - and for those of you who are 
watching in black and white, the pink is next to the green." Snooker 
commentator 'Whispering' Ted Lowe.

Mark Lawrence



More information about the Tutor mailing list