Skip to content

Commit fa40fc0

Browse files
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
(cherry picked from commit ddb6215) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 6079b60 commit fa40fc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/tutorial/interpreter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ where *encoding* is one of the valid :mod:`codecs` supported by Python.
148148
For example, to declare that Windows-1252 encoding is to be used, the first
149149
line of your source code file should be::
150150

151-
# -*- coding: cp-1252 -*-
151+
# -*- coding: cp1252 -*-
152152

153153
One exception to the *first line* rule is when the source code starts with a
154154
:ref:`UNIX "shebang" line <tut-scripts>`. In this case, the encoding
155155
declaration should be added as the second line of the file. For example::
156156

157157
#!/usr/bin/env python3
158-
# -*- coding: cp-1252 -*-
158+
# -*- coding: cp1252 -*-
159159

160160
.. rubric:: Footnotes
161161

0 commit comments

Comments
 (0)