summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-12-15 14:23:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-12-15 14:23:24 (GMT)
commit77bf6da7258b4a312e224860ea50ac010aa17c1e (patch)
tree6926f669326962365cb42b73acf0feb70d1e1c2c
parentb580f4f2bf49fd3b11f2a046911993560c02492a (diff)
downloadcpython-77bf6da7258b4a312e224860ea50ac010aa17c1e.zip
cpython-77bf6da7258b4a312e224860ea50ac010aa17c1e.tar.gz
cpython-77bf6da7258b4a312e224860ea50ac010aa17c1e.tar.bz2
bpo-28393: Update encoding lookup docs wrt bpo-27938 (GH-4871) (#4881)
(cherry picked from commit 297fd876aad8ef443d8992618de22c46dbda258b)
-rw-r--r--Doc/library/codecs.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 6e249ec..74b24e1 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -977,10 +977,14 @@ e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
Some common encodings can bypass the codecs lookup machinery to
improve performance. These optimization opportunities are only
- recognized by CPython for a limited set of aliases: utf-8, utf8,
- latin-1, latin1, iso-8859-1, mbcs (Windows only), ascii, utf-16,
- and utf-32. Using alternative spellings for these encodings may
- result in slower execution.
+ recognized by CPython for a limited set of (case insensitive)
+ aliases: utf-8, utf8, latin-1, latin1, iso-8859-1, iso8859-1, mbcs
+ (Windows only), ascii, us-ascii, utf-16, utf16, utf-32, utf32, and
+ the same using underscores instead of dashes. Using alternative
+ aliases for these encodings may result in slower execution.
+
+ .. versionchanged:: 3.6
+ Optimization opportunity recognized for us-ascii.
Many of the character sets support the same languages. They vary in individual
characters (e.g. whether the EURO SIGN is supported or not), and in the