Tony pointed me in the right direction. My old understanding of default parameters was that they were set each time the function was called. It appears however that each call to the function actually mutates the function object, meaning that if a mutatble object is changed that change is permanent. Heres some helpful answers
Now I get to rewrite most of my python programs.