Message289367
codecs.open() works with bytes-to-bytes codecs.
>>> f = codecs.open('test1', 'w', encoding='hex_codec')
>>> f.write(b'hello')
>>> f.close()
>>> open('test1', 'rb').read()
b'68656c6c6f'
In additional the interface of StreamReaderWriter is not fully compatible with the interface of io classes. This would be compatible-breaking change. |
|
Date |
User |
Action |
Args |
2017-03-10 14:33:11 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, lemburg, vstinner, ezio.melotti |
2017-03-10 14:33:11 | serhiy.storchaka | set | messageid: <1489156391.73.0.135070139744.issue29783@psf.upfronthosting.co.za> |
2017-03-10 14:33:11 | serhiy.storchaka | link | issue29783 messages |
2017-03-10 14:33:11 | serhiy.storchaka | create | |
|