hi, i have the following recursive function (simplified to demonstrate
the problem):

>>> def reTest(bool):
...     result = []
...     if not bool:
...             reTest(True)
...     else:
...             print "YAHHH"
...             result = ["should be the only thing returned"]
...     print "printing result: "
...     print result
...     return result
...
>>> reTest(False)
YAHHH
printing result:
['should be the only thing returned']
printing result:
[]
[]

I don't understand why results are returned twice? is there something
special i missed about recursive functions?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to