]> granicus.if.org Git - python/commitdiff
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 9 May 2018 09:00:13 +0000 (02:00 -0700)
committerGitHub <noreply@github.com>
Wed, 9 May 2018 09:00:13 +0000 (02:00 -0700)
(cherry picked from commit ddb6215a55b0218b621d5cb755e9dfac8dab231a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/tutorial/interpreter.rst

index 3bd100d46a12b7d4f923f6e4c9dffd45e6cab0be..d04f7cefa0dfd198f3d2684e0e6c061377935af0 100644 (file)
@@ -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