Re: recursion with or without return?

2008-05-25 Thread Marc 'BlackJack' Rintsch
On Sun, 25 May 2008 00:00:14 -0700, notnorwegian wrote: > when using recursion should one use a return statement or not? This decision has nothing to do with recursion. It's the same as in non recursive functions. If the function calculates something that you want to return to the caller you ha

recursion with or without return?

2008-05-25 Thread notnorwegian
when using recursion should one use a return statement or not? there is a difference obv since with a return statement it will ultimately return a value if not recursing forever. but is there a guideline for this or it just taste or is it considering good style or pythonic to always have a return