This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, fenner
Date 2009-09-24.16:12:14
SpamBayes Score 0.00011405846
Marked as misclassified No
Message-id <1253808737.23.0.0938175769721.issue6988@psf.upfronthosting.co.za>
In-reply-to
Content
I'll take the opposite point of view:
the bad behavior was introduced with 2.5.1 (issue1548891, r52302), and
reverted for 2.5.2 because "it broke backwards compatibility with
arbitrary read buffers" (issue1730114, r53831)

The difference is in cStringIO:

>>> from cStringIO import StringIO
>>> StringIO(u"Hello, World!").read()
'H\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00,\x00\x00\x00
\x00\x00\x00W\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x00\x00!\x00\x00\x00'

The byte order is not different in the two strings: but u" " becomes 
" \x00\x00\x00" and the three zeros are copied into the second item.
History
Date User Action Args
2009-09-24 16:12:17amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, fenner
2009-09-24 16:12:17amaury.forgeotdarcsetmessageid: <1253808737.23.0.0938175769721.issue6988@psf.upfronthosting.co.za>
2009-09-24 16:12:15amaury.forgeotdarclinkissue6988 messages
2009-09-24 16:12:14amaury.forgeotdarccreate