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
Date 2008-08-18.15:39:38
SpamBayes Score 2.793285e-10
Marked as misclassified No
Message-id <ffb592890808180839y2aab3dfbo96d79ec33946b37e@mail.gmail.com>
In-reply-to <1219072159.05.0.905939697943.issue3590@psf.upfronthosting.co.za>
Content
On Mon, Aug 18, 2008 at 10:09 AM, Benjamin Peterson
<report@bugs.python.org>wrote:

>
> Benjamin Peterson <musiccomposition@gmail.com> added the comment:
>
> It should probably be changed to just while buffer != b"" since it
> requests a byte stream.

That was my guess as well.  I added the extra test so as not to remove a
test that might, under some circumstance be important.

Just to be clear, I am at present totally confused about io streams :-)
Especially as used by the sax parsers.  In particular, opening a file in 'r'
mode, that is, passing a *non*-byte stream to parser.parse, works, while
opening a file in 'rb' mode, that is, passing a *byte* stream to
parser.parse, hangs.

Anyway, opening the file passed to parser.parse with 'r' mode looks like the
(only) way to go when using Python 3.0.  In Python 2.5, opening files passed
to parser.parse in 'rb' mode works.  I don't recall whether I had any reason
for 'rb' mode: it may have been an historical accident, or just a lucky
accident :-)

Edward
--------------------------------------------------------------------
Edward K. Ream email: edreamleo@gmail.com
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------
Files
File name Uploaded
unnamed edreamleo, 2008-08-18.15:39:36
History
Date User Action Args
2008-08-18 15:39:39edreamleosetrecipients: + edreamleo, benjamin.peterson
2008-08-18 15:39:38edreamleolinkissue3590 messages
2008-08-18 15:39:38edreamleocreate