I have some Python code that basically looks like this:
my_start_list = ...
def process ( my_list ):
#do some stuff
if len(my_list) > 1:
As others have pointed out, you are missing a return
statement.
I personally would turn that tail recursion into iteration:
def process(my_list):
while True:
# do some stuff
if len(my_list) <= 1:
return my_list
I think this makes the intent a little clearer, and also avoids some pitfalls associated with tail recursion.