Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-13525: Fix incorrect encoding name in the tutorial example. #6738

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-13525: Fix incorrect encoding name in the tutorial example.
  • Loading branch information
serhiy-storchaka committed May 9, 2018
commit abe300aaa0f982188dacded385296d700269db15
4 changes: 2 additions & 2 deletions Doc/tutorial/interpreter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down