python3 urlopen(...).read() returns bytes

ajaksu ajaksu at gmail.com
Tue Dec 23 22:57:37 CET 2008


On Dec 23, 12:51 pm, Christian Heimes <li... at cheimes.de> wrote:
> If you want to do it right ... It should be a clean patch against the
> py3k svn branch including documentation and a unit test.

Got all three at http://bugs.python.org/issue4733 . Probably got all
three wrong too, so any feedback is very welcome :)

I think a neat improvement, besides better docs, names, code, etc.,
would be to implement Carl Bank's idea of checking Content-Encoding.

Oh, and there's a 'print("Using default charset '%s'" %
response.charset)' in there that seemed educational when I wrote it,
but now sounds lame :)

Glenn, can you test the patch[1] there?

Thanks for the encouragement, Chris! I hope we don't regret it :D

Daniel

[1]http://bugs.python.org/file12437/urlopen_text.diff



More information about the Python-list mailing list