def __setstate__(self, state):
        "clear the list and restore all objects from the state"
        del self[:]
        self.extend(state)
clear the list and restore all objects from the state
recipes/Python/551788_Transactionable_Objects_reloaded/recipe-551788.py