On Thu, Jan 15, 2009 at 9:27 AM, dpapathanasiou <denis.papathanas...@gmail.com> wrote: > Without the "if priors:" line just above the first return statement (a > typo perhaps?), then yes, it would do what I want.
Yes sorry it was :) >> a) a global should and need not be used. > > Passing the entire dictionary to every function that accesses it is > better? Yes :) >> b) this function could be rewritten without recursion. > > Right, any recursive function can be written iteratively and vice- > versa. I'm not sure that makes it "bad". No it doesn't necessarily make it bad, but recursion is not necessary here :) What does history_db look like ? I think I can write a much simpler function for you. Also, show me what the results are used for. cheers James -- http://mail.python.org/mailman/listinfo/python-list