ndicts are now deepcopyable.

This commit is contained in:
Thomas Wiecki
2012-07-06 11:54:40 -04:00
parent f6c65983bb
commit 5fcb2de59b
2 changed files with 31 additions and 4 deletions
+3
View File
@@ -55,6 +55,9 @@ class ndict(MutableMapping):
# Abstact Overloads
# -----------------
def __deepcopy__(self, memo):
return ndict(copy.deepcopy(self.__internal))
def __setattr__(self, key, value):
if key == 'cls' or key == '__internal' or '_ndict' in key:
super(ndict, self).__setattr__(key, value)