No subject


Fri Jan 7 07:23:30 MST 2011


 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?

--0016e64347da63db10049c65079c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



More information about the Twisted-Python mailing list