my recursive function call is wrong?

Chang Min Jeon jcm1981 at gmail.com
Sun Aug 16 12:17:42 EDT 2009


Dear Kev

Thank you very much.
I got it.:)

2009/8/16 Kev Dwyer <kevin.p.dwyer at gmail.com>

> On Sun, 16 Aug 2009 16:57:41 +0900, Chang Min Jeon wrote:
>
>
> Hello,
>
> You have placed recursive calls to the function in a number of different
> locations; when len(macro) becomes zero control will return to the
> calling function, but this calling function may have more code to
> execute, including further calls to start_parse(), and further attempts
> to index macro.
>
> I like to keep recursive calls at the end of a function, so that there is
> a clean path back to the top level caller once the terminal condition is
> reached.  You can do it differently, but you need to bear in mind the
> execution paths through your code.
>
> Cheers,
>
> Kev
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
CashFlow
To be rich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090817/cbb30000/attachment-0001.html>


More information about the Python-list mailing list