Simplifications to Regularization code.

This commit is contained in:
rowanc1
2013-12-18 11:11:32 -08:00
parent 21d0a772bc
commit 43b81e1396
2 changed files with 62 additions and 67 deletions
+9
View File
@@ -124,6 +124,15 @@ def callHooks(match):
return wrapper
return callHooksWrap
def dependentProperty(name, value, children, doc):
def fget(self): return getattr(self,name,value)
def fset(self, val):
for child in children:
if hasattr(self, child):
delattr(self, child)
setattr(self, name, val)
return property(fget=fget, fset=fset, doc=doc)
class Counter(object):
"""