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 mark
Recipients mark
Date 2008-09-22.11:18:14
SpamBayes Score 0.014446082
Marked as misclassified No
Message-id <1222082355.39.0.877616271155.issue3930@psf.upfronthosting.co.za>
In-reply-to
Content
Py30rc1

On Windows the file object returned by urllib.request.urlopen() appears
to be in binary mode, so .read() returns a bytes object. But on Linux it
appears to be in text mode, so .read() returns a str object. It seeems
to me that the same type of file object should be returned on all
platforms, otherwise you have to test the platform and use str.encode()
or bytes.decode() depending on where the code is running.
History
Date User Action Args
2008-09-22 11:19:15marksetrecipients: + mark
2008-09-22 11:19:15marksetmessageid: <1222082355.39.0.877616271155.issue3930@psf.upfronthosting.co.za>
2008-09-22 11:18:15marklinkissue3930 messages
2008-09-22 11:18:14markcreate