One of the reasons this might be is that you're using a mutable type (dict) in a function signature. This is Bad:tm:. Here's why:

http://effbot.org/zone/default-values.htm

TL;DR is that this dict is created once, then when (if) it's modified those changes stick around and are used in the subsequent calls.