def put(self, prop, val, op=None):  
if self.Class == '<STR_LIT>' or self.Class == '<STR_LIT>':<EOL><INDENT>raise MakeError('<STR_LIT>',<EOL>'<STR_LIT>')<EOL><DEDENT>if not isinstance(prop, basestring):<EOL><INDENT>prop = prop.to_string().value<EOL><DEDENT>if NUMPY_AVAILABLE and prop.isdigit():<EOL><INDENT>if self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.int8(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.uint8(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>if val < Js(numpy.uint8(<NUM_LIT:0>)):<EOL><INDENT>val = Js(numpy.uint8(<NUM_LIT:0>))<EOL><DEDENT>elif val > Js(numpy.uint8(<NUM_LIT:255>)):<EOL><INDENT>val = Js(numpy.uint8(<NUM_LIT:255>))<EOL><DEDENT>else:<EOL><INDENT>val = Js(numpy.uint8(val.to_number().value))<EOL><DEDENT><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.int16(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.uint16(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.int32(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.uint32(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.float32(val.to_number().value))<EOL><DEDENT>elif self.Class == '<STR_LIT>':<EOL><INDENT>val = Js(numpy.float64(val.to_number().value))<EOL><DEDENT>if isinstance(self.buff, numpy.ndarray):<EOL><INDENT>self.buff[int(prop)] = int(val.to_number().value)<EOL><DEDENT><DEDENT>if op is not None:<EOL><INDENT>val = getattr(self.get(prop), OP_METHODS[op])(val)<EOL><DEDENT>if not self.can_put(prop):<EOL><INDENT>return val<EOL><DEDENT>own_desc = self.get_own_property(prop)<EOL>if is_data_descriptor(own_desc):<EOL><INDENT>if self.Class in [<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>'<EOL>]:<EOL><INDENT>self.define_own_property(prop, {'<STR_LIT:value>': val})<EOL><DEDENT>else:<EOL><INDENT>self.own[prop]['<STR_LIT:value>'] = val<EOL><DEDENT>return val<EOL><DEDENT>desc = self.get_property(prop)<EOL>if is_accessor_descriptor(desc):<EOL><INDENT>desc['<STR_LIT>'].call(self, (val, ))<EOL><DEDENT>else:<EOL><INDENT>new = {<EOL>'<STR_LIT:value>': val,<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT>': True<EOL>}<EOL>if self.Class in [<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>'<EOL>]:<EOL><INDENT>self.define_own_property(prop, new)<EOL><DEDENT>else:<EOL><INDENT>self.own[prop] = new<EOL><DEDENT><DEDENT>return val<EOL>
Just like in js: self.prop op= val
           for example when op is '+' it will be self.prop+=val
           op can be either None for simple assignment or one of:
           * / % + - << >> & ^ |