[Python-3000] PEP 3108: Standard Library Reorganization
Michael Urman
murman at gmail.com
Wed Jan 3 15:23:29 CET 2007
On 1/2/07, Anthony Baxter <anthony at interlink.com.au> wrote:
> base64.encodestring('hello world')
> or
> base64.b64encode('hello world')
>
> become
> codecs.getencoder('base64')('hello')[0]
Isn't this a lot more idiomatically translated as
'hello world'.encode('base64')
or is there still too much worry that this will require
encoding/decoding ascii bytestrings?
Your additional points about base32 and base16 still apply to
.encode(), as they each result in an unknown encoding LookupError.
--
Michael Urman http://www.tortall.net/mu/blog
More information about the Python-3000
mailing list