summaryrefslogtreecommitdiff
path: root/Doc/library/tokenize.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-03-18 22:29:52 +0000
committerBenjamin Peterson <benjamin@python.org>2010-03-18 22:29:52 +0000
commit3aa38a931ab0b5cdd75129e7ce66efc88a7c9989 (patch)
treecc34e6caba50a9b9749aec21e101d46a77be9864 /Doc/library/tokenize.rst
parent3a5cd5f680a2d0f997be519a0900b8ad10746db4 (diff)
downloadcpython-3aa38a931ab0b5cdd75129e7ce66efc88a7c9989.tar.gz
in tokenize.detect_encoding(), return utf-8-sig when a BOM is found
Diffstat (limited to 'Doc/library/tokenize.rst')
-rw-r--r--Doc/library/tokenize.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index 7017045f61..ac6ae36bd5 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -95,7 +95,8 @@ function it uses to do this is available:
It detects the encoding from the presence of a UTF-8 BOM or an encoding
cookie as specified in :pep:`263`. If both a BOM and a cookie are present,
- but disagree, a SyntaxError will be raised.
+ but disagree, a SyntaxError will be raised. Note that if the BOM is found,
+ ``'utf-8-sig'`` will be returned as an encoding.
If no encoding is specified, then the default of ``'utf-8'`` will be returned.