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

(cherry picked from commit ddb6215a55)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-05-09 01:54:38 -07:00 committed by GitHub
parent c587235f21
commit 8ffff34ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View 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