You're trying to use a static variable as an accumulator variable -- as it is sometime done in C.
If you really want to do something like that, you might pass the accumulator down while recursively calling your function. And the function should return the accumulated value.
>>> def my_recursive_fct(n, acc = 0):
... if n > 0:
... acc = my_recursive_fct(n-1, acc)
... return acc+n
...
>>> my_recursive_fct(5)
15
>>> my_recursive_fct(0)
0
Not sure this is the best Python style. At least in that case ;)
For purists, you might wish to reorder instructions in order to end your function by the recursive call -- but I think this is pointless in Python as it does not perform tail call optimization (or am I wrong?)