Python bug? Named parameters in recursive calls sometimes confuses python?

John J. Lee jjl at
Sun Nov 30 16:37:24 CET 2003

magnus at (Magnus Lyck?) writes:

> Something really strange is happening to me (sometimes).
> I'm using Python 2.3.2 on NT 4.0 as well as win32all-157,
> adodbapi and db_row. 
> During a recursive call to a method, it seems Python messes 
> up its variable bindings once in a while. Suddenly, one of 
> several local variables gets rebound to the object it was bound 
> to one step up in the recursion. 

Try sticking in an extra parameter to the recursive function,
recursion_level=0, print and incrementing it at the start of the
function, and make sure every recursive call passes that optional


More information about the Python-list mailing list