[Twisted-Python] Could this be an error in pcp.py?

Gabriel Rossetti mailing_lists at evotex.ch
Wed Apr 23 09:30:17 MDT 2008


Jean-Paul Calderone wrote:
> On Wed, 23 Apr 2008 16:48:26 +0200, Gabriel Rossetti 
> <mailing_lists at evotex.ch> wrote:
>> Jean-Paul Calderone wrote:
>> [snip]
>>>
>>> `self._buffer´ is a list of strings (hence the join call to create 
>>> `data´)
>>> so comparing the number of bytes sent to its length wouldn't make 
>>> sense.
>>>
>>> Jean-Paul
>> Ok, yes, true, but there is still the fact that bytesSent == 
>> len(data) and thus the test will never be true, or did I miss 
>> something? From my tests self.transport.write(data) doesn't modify 
>> the data, and so it still has the same size as it had before being sent.
>
> If bytesSent == len(data), then the else case is taken and the buffer is
> empty.  I'm not really sure what you're getting at.
>
> Jean-Paul
>
Ok, I must be way off, because as I see it bytesSent < len(data) is 
never true.

Gabriel




More information about the Twisted-Python mailing list