Use shorter code for clear, as per cachedout

This commit is contained in:
Joseph Hall 2016-07-18 11:56:21 -06:00
parent 78ce7ff4e0
commit 23032f6d30

View File

@ -116,10 +116,8 @@ def clear(name):
'changes': {},
'comment': '',
'result': True}
if name in __reg__ and isinstance(__reg__[name], set):
__reg__[name] = {'val': set()}
else:
__reg__[name] = {'val': []}
if name in __reg__:
__reg__[name].clear()
return ret