This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Whats new: Obligatory source code encodings if not ASCII
Type: Stage:
Components: Documentation Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, rnd0110
Priority: normal Keywords:

Created on 2003-02-09 14:52 by rnd0110, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (2)
msg14528 - (view) Author: Roman Suzi (rnd0110) Date: 2003-02-09 14:52
As per PEP 263, source code encoding cookie is a must
for source code file. This fact  is not stressed enough in
the documentation.

I think, these sections must be changed to reflect PEP263:

What's new in Python 2.3

Section 3: PEP 263 Source Code Encoding
 must inform the reader on this:

Source files which use non-ASCII characters and do not
have encoding declaration are phased out. Python 2.3 
gives DeprecationWarnings. Later versions will give
SyntraxError
instead.


13.1 String changes

Unicode literals can now contain characters of the
source file encoding if such was specified (see PEP 263).



18 Porting to Python 2.3 section needs addition:

* to avoid DeprecationWarnings, add encoding
declaration to all source files according to PEP 263,
if they are using non-ASCII characters. After that,
Unicode strings could be specified with symbols from
specified encoding.

(Please correct my English, as it is not native)

(I'll look into other docs and submit corrections to
them separately)
msg14529 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-02-18 00:51
Logged In: YES 
user_id=11375

Updated; thanks!
History
Date User Action Args
2022-04-10 16:06:40adminsetgithub: 37945
2003-02-09 14:52:29rnd0110create