# HG changeset patch # User catherine@dellzilla # Date 1265917610 18000 # Node ID fc1e5a1419209ecac170036caa6db29320783d4c # Parent 7cd74e42b7f974dc18b151c359c30063492e1eab tweak to settable diff -r 7cd74e42b7f9 -r fc1e5a141920 cmd2.py --- a/cmd2.py Thu Feb 11 14:41:07 2010 -0500 +++ b/cmd2.py Thu Feb 11 14:46:50 2010 -0500 @@ -37,6 +37,7 @@ import glob import traceback import platform +import copy from code import InteractiveConsole, InteractiveInterpreter, softspace from optparse import make_option @@ -291,6 +292,14 @@ def __iadd__(self, arg): self.update(arg) return self + def __add__(self, arg): + selfcopy = copy.copy(self) + selfcopy.update(stubbornDict(arg)) + return selfcopy + def __radd__(self, arg): + selfcopy = copy.copy(self) + selfcopy.update(stubbornDict(arg)) + return selfcopy @classmethod def to_dict(cls, arg):