>From twisted.protocols.basic.IntNStringReceiver.sendString(): def sendString(self, string): self.transport.write( struct.pack(self.structFormat, len(string)) + string)
Would it make sense to do something like this instead: def sendString(self, string): self.transport.write( struct.pack(self.structFormat, len(string))) self.transport.write(string) in order to avoid the creation of the extra string object?
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python