Author Pam.McANulty
Recipients Pam.McANulty, fdrake, pitrou
Date 2013-04-15.13:52:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366033943.52.0.208998417734.issue17530@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-04-15 13:52:23Pam.McANultysetrecipients: + Pam.McANulty, fdrake, pitrou
2013-04-15 13:52:23Pam.McANultysetmessageid: <1366033943.52.0.208998417734.issue17530@psf.upfronthosting.co.za>
2013-04-15 13:52:23Pam.McANultylinkissue17530 messages
2013-04-15 13:52:23Pam.McANultycreate