bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6… · python/cpython@8ffff34

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