R. David Murray added the comment:

I tweaked your additions.  Instead of trying to strip out the 'b' to make 
things "look pretty", I think it is better to print them and thus make it 
explicit when we are dealing with binary data and when we are dealing with 
strings.  It also clues the user in to the fact that the escaping inside the 
string is that used for bytes display, as opposed to string display.  I also 
expanded the tests to include headers so that the 'X-Peer' header addition 
would get tested.  This reveals a bug; whether it is in the tests or the code I 
don't know: the value of self.peer in the process_ methods is 'peer', not the 
expected ('b', 0).  If you can look in to this issue it would be great.

That looks like the last issue that needs to be addressed before commit.

(Oh, yeah, and there was a bug in the original process_message code...it was 
printing an extra blank line at the end of the message text if there was, as 
there should be, a newline at the end of the message...I fixed that by 
switching to splitlines instead of split.)

----------
Added file: http://bugs.python.org/file36328/issue21725v5.3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to