def copymod(dct, without=None, **kwargs):
 if (without is None):
  without = []
 rval = copy(dct)
 for a in without:
  if (a in rval):
   del rval[a]
 for (kw, val) in iteritems(kwargs):
  rval[kw] = val
 return rval

def copymod ( dct , without = None , ** kwargs ) : if ( without is None ) : without = [ ] rval = copy ( dct ) for a in without : if ( a in rval ) : del rval [ a ] for ( kw , val ) in iteritems ( kwargs ) : rval [ kw ] = val return rval
return dct but with the keys named by args removed .