On 27/09/11 19:32, c smith wrote:
i understand the general idea of recursion and if I am following well
written code I can understand how it works, but when I try to write it
for myself I get a bit confused with the flow.
Others have dealt with the specifics.
If you really want to learn how to
Mac Ryan wrote:
raise BaseException('Something is wrong here!')
Never raise BaseException directly! BaseException is the very top of the
exception hierarchy, you should raise the *most* specific exception you
can, not the least specific. BaseException isn't even just for errors,
it's al
c smith wrote:
hi list,
i understand the general idea of recursion and if I am following well
written code I can understand how it works, but when I try to write it for
myself I get a bit confused with the flow.
Your flow is fine. You just forget to return anything in two of the
three branches
On Tue, 27 Sep 2011 14:32:00 -0400
c smith wrote:
> hi list,
> i understand the general idea of recursion and if I am following well
> written code I can understand how it works, but when I try to write
> it for myself I get a bit confused with the flow.
> I was trying to turn an ackerman functio
hi list,
i understand the general idea of recursion and if I am following well
written code I can understand how it works, but when I try to write it for
myself I get a bit confused with the flow.
I was trying to turn an ackerman function into python code for practice and
I tried writing it like th