def _write_self(self,message): message.fromstring(parser.write_byte(0)+parser.write_integer(len(self))) for el in self: if self.type.code != 0: message.fromstring(self.type.write_data(el)) else: message.fromstring(parser.write(el)) return message
def _write_self(self, message): message.fromstring( parser.write_byte(0) + parser.write_integer(len(self))) for el in self: if self.type.code != 0: message.fromstring(self.type.write_data(el)) else: message.fromstring(parser.write(el)) return message
def _write(val,message): if isinstance(val,table): val=val._data message.fromstring(parser.write_byte(0)+parser.write_byte(99)) return q_dict._write(val,message)
def _write(val, message): if isinstance(val, table): val = val._data message.fromstring(parser.write_byte(0) + parser.write_byte(99)) return q_dict._write(val, message)