diff --git a/zipline/utils/protocol_utils.py b/zipline/utils/protocol_utils.py index 621d7ab9..376fc8c7 100644 --- a/zipline/utils/protocol_utils.py +++ b/zipline/utils/protocol_utils.py @@ -51,8 +51,8 @@ class ndict(MutableMapping): # ----------------- def __setattr__(self, key, value): - if 'ndict' in key or key == 'cls': - MutableMapping.__setattr__(self, key, value) + if '_ndict' in key or key == 'cls': + self.__dict__[key] = value else: self.__internal[key] = value return value