On Fri, Dec 3, 2010 at 4:16 AM, Victor Stinner
<victor.stin...@haypocalc.com> wrote:
..
> I don't like transform() and untransform() because I think that we should not
> add too much operations to the base types (bytes and str), and they do
> implicit module import. I prefer explicit module import (eg. import binascii;
> binascii.hexlify(b'to hex')).

+1

Implicit imports are currently subtly broken with no solution in sight.  See

http://bugs.python.org/issue8098
http://bugs.python.org/issue7980

In fact, once the language moratorium is over, I will argue that
str.encode() and byte.decode() should deprecate encoding argument and
just do UTF-8 encoding/decoding.  Hopefully by that time most people
will forget that other encodings exist.  (I can dream, right?)  Python
can still provide the codec machinery but not tie it to str/bytes
builtins.  After all, neither encode/decode nor transform/unstransform
fully utilize the power of codec design.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to