On 1/2/07, Anthony Baxter <[EMAIL PROTECTED]> 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
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to