[Python-checkins] bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)

Serhiy Storchaka webhook-mailer at python.org
Wed May 9 04:10:58 EDT 2018


https://github.com/python/cpython/commit/ddb6215a55b0218b621d5cb755e9dfac8dab231a
commit: ddb6215a55b0218b621d5cb755e9dfac8dab231a
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-05-09T11:10:55+03:00
summary:

bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)

files:
M Doc/tutorial/interpreter.rst

diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst
index 3d57020dabe8..6cdc6c8419af 100644
--- a/Doc/tutorial/interpreter.rst
+++ b/Doc/tutorial/interpreter.rst
@@ -148,14 +148,14 @@ where *encoding* is one of the valid :mod:`codecs` supported by Python.
 For example, to declare that Windows-1252 encoding is to be used, the first
 line of your source code file should be::
 
-   # -*- coding: cp-1252 -*-
+   # -*- coding: cp1252 -*-
 
 One exception to the *first line* rule is when the source code starts with a
 :ref:`UNIX "shebang" line <tut-scripts>`.  In this case, the encoding
 declaration should be added as the second line of the file.  For example::
 
    #!/usr/bin/env python3
-   # -*- coding: cp-1252 -*-
+   # -*- coding: cp1252 -*-
 
 .. rubric:: Footnotes
 



More information about the Python-checkins mailing list