On Fri, Dec 3, 2010 at 4:16 AM, Victor Stinner <victor.stinner at 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4