diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-12-12 01:33:04 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-12-12 01:33:04 (GMT) |
commit | 28a4dce6a827eb221e986722c90bb1343e5db8e3 (patch) | |
tree | 953cf11d4120074bdec3bc1008a81da484958ea5 /Doc/whatsnew/3.2.rst | |
parent | 18d378dc3dca99e207047d6a32ebc36ef43c671b (diff) | |
download | cpython-28a4dce6a827eb221e986722c90bb1343e5db8e3.zip cpython-28a4dce6a827eb221e986722c90bb1343e5db8e3.tar.gz cpython-28a4dce6a827eb221e986722c90bb1343e5db8e3.tar.bz2 |
remove (un)transform methods
Diffstat (limited to 'Doc/whatsnew/3.2.rst')
-rw-r--r-- | Doc/whatsnew/3.2.rst | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 40d5ae2..837a591 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -406,26 +406,6 @@ Other Language Changes Some smaller changes made to the core Python language are: -* :class:`bytes` and :class:`str` now have two net methods, *transform* and - *untransform*. These provide analogues to *encode* and *decode* but are used - for general purpose str-to-str and bytes-to-bytes transformations rather than - Unicode codecs for bytes-to-str and str-to-bytes. - - Along with the new methods, several non-unicode codecs been restored from Python 2.x - including *base64*, *bz2*, *hex*, *quopri*, *rot13*, *uu*, and *zlib*. - - >>> t = b'which witch had which witches wrist watch' - >>> t.transform('quopri') - b'which=20witch=20had=20which=20witches=20wrist=20watch' - - >>> short = t.transform('zlib_codec') - >>> len(t), len(short) - (41, 38) - >>> short.untransform('zlib_codec') - b'which witch had which witches wrist watch' - - (From multiple contributors in :issue:`7475`.) - * String formatting for :func:`format` and :meth:`str.format` gained new capabilities for the format character **#**. Previously, for integers in binary, octal, or hexadecimal, it caused the output to be prefixed with '0b', |