[Python-Dev] bytes.from_hex() (original) (raw)

Adam Olsen rhamph at gmail.com
Sat Feb 18 14:19:26 CET 2006


On 2/18/06, Josiah Carlson <jcarlson at uci.edu> wrote:

Look at what we've currently got going for data transformations in the standard library to see what these removals will do: base64 module, binascii module, binhex module, uu module, ... Do we want or need to add another top-level module for every future encoding/codec that comes out (or does everyone think that we're done seeing codecs)? Do we want to keep monkey-patching binascii with names like 'a2bhqx'? While there is currently one text->text transform (rot13), do we add another module for text->text transforms? Would it start having names like t2erot13() and e2trot13()?

If top-level modules are the problem then why not make codecs into a package?

from codecs import utf8, base64

utf8.encode(u) -> b utf8.decode(b) -> u base64.encode(b) -> b base64.decode(b) -> b

-- Adam Olsen, aka Rhamphoryncus



More information about the Python-Dev mailing list