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

Christian Heimes lists at cheimes.de
Tue Dec 23 09:51:48 EST 2008


ajaksu wrote:
> On Dec 22, 9:05 pm, Christian Heimes <li... at cheimes.de> wrote:
>> ajaksu schrieb:
>>
>>> That said, a "decode to declared HTTP header encoding" version of
>>> urlopen could be useful to give some users the output they want (text
>>> from network io) or to make it clear why bytes is the safe way.
>> Yeah, your idea sounds both useful and feasible. A patch is welcome! :)
> 
> Would monkeypatching what urlopen returns be good enough or should we
> aim at a cleaner implementation?

If you want to do it right ... It should be a clean patch against the
py3k svn branch including documentation and a unit test. Don't worry!
It's not as hard as it sounds. Besides Python core development is fun. :)

Christian




More information about the Python-list mailing list