Skip to content

Commit d7e783b

Browse files
[2.7] bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738). (GH-6744)
(cherry picked from commit ddb6215)
1 parent 903f189 commit d7e783b

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
@@ -137,12 +137,12 @@ where *encoding* is one of the valid :mod:`codecs` supported by Python.
137137
For example, to declare that Windows-1252 encoding is to be used, the first
138138
line of your source code file should be::
139139

140-
# -*- coding: cp-1252 -*-
140+
# -*- coding: cp1252 -*-
141141

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

146146
#!/usr/bin/env python
147-
# -*- coding: cp-1252 -*-
147+
# -*- coding: cp1252 -*-
148148

0 commit comments

Comments
 (0)