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 edreamleo
Recipients benjamin.peterson, edreamleo, pitrou
Date 2008-08-18.20:21:42
SpamBayes Score 2.892429e-07
Marked as misclassified No
Message-id <ffb592890808181321peb5f36cjb93d30aae9e0d8f1@mail.gmail.com>
In-reply-to <1219075257.86.0.56360168489.issue3590@psf.upfronthosting.co.za>
Content
On Mon, Aug 18, 2008 at 11:00 AM, Antoine Pitrou <report@bugs.python.org>wrote:

>
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
> > Just to be clear, I am at present totally confused about io streams :-)
>
> Python 3.0 distincts more clearly between unicode strings (called "str"
> in 3.0) and bytes strings (called "bytes" in 3.0). The most important
> point being that there is no more any implicit conversion between the
> two: you must explicitly use .encode() or .decode().
>
> Files opened in binary ("rb") mode returns byte strings, but files
> opened in text ("r") mode return unicode strings, which means you can't
> give a text file to 3.0 library expecting a binary file, or vice-versa.
>
> What is more worrying is that XML, until decoded, should be considered a
> byte stream, so sax.parser should accept binary files rather than text
> files. I took a look at test_sax and indeed it considers XML as text
> rather than bytes :-(

Thanks for these remarks.  They confirm what I suspected, but was unsure of,
namely that it seems strange to be passing something other than a byte
stream to parser.parse.

>
> Bumping this as critical because it needs a decision very soon (ideally
> before beta3).

Thanks for taking this seriously.

Edward

P.S.  I love the new unicode plans.  They are going to cause some pain at
first for everyone (Python team and developers), but in the long run they
are going to be a big plus for Python.

EKR
--------------------------------------------------------------------
Edward K. Ream email: edreamleo@gmail.com
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------
Files
File name Uploaded
unnamed edreamleo, 2008-08-18.20:21:41
History
Date User Action Args
2008-08-18 20:21:44edreamleosetrecipients: + edreamleo, pitrou, benjamin.peterson
2008-08-18 20:21:43edreamleolinkissue3590 messages
2008-08-18 20:21:42edreamleocreate