Pam McA'Nulty added the comment:

Here's a patch.  I needed to handle the fact that the repr of a single byte can 
be 1, 2 or 4 characters long and did not want to wrap in the middle of a byte 
representation.  Note also that bytes literals require a continuation 
character.  In the pathological case where the wrap size is smaller than the 
representation of a single byte, I chose to always print at least one byte per 
line.

As an aside, I also replaced the str wrapping code's calls to len with the 
cached _len used in the rest of pprint.py

----------
keywords: +patch
nosy: +Pam.McANulty
Added file: http://bugs.python.org/file29865/bytes_pprint.patch

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

Reply via email to