def init_helper(obj, kw):
 for (k, v) in kw.iteritems():
  if (not hasattr(obj, k)):
   raise TypeError(((((obj.__class__.__name__ + ' constructor got ') + "unexpected keyword argument '") + k) + "'"))
  setattr(obj, k, v)

def init_helper ( obj , kw ) : for ( k , v ) in kw . iteritems ( ) : if ( not hasattr ( obj , k ) ) : raise TypeError ( ( ( ( ( obj . __class__ . __name__ + ' constructor got ' ) + "unexpected keyword argument '" ) + k ) + "'" ) ) setattr ( obj , k , v )
helper for classes with attributes initialized by keyword arguments .