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: "ASCII" in doc section "String literals"
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: felixwiemann, loewis
Priority: normal Keywords:

Created on 2004-09-10 18:52 by felixwiemann, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg22426 - (view) Author: Felix Wiemann (felixwiemann) Date: 2004-09-10 18:52
Section '2.4.1 String literals' says that
shortstringchar and longstringchar are ASCII
characters.  This is wrong, however, because non-ASCII
characters are allowed as well.

The documentation of \xhh and \ooo (in the same
section) says that they represent ASCII characters.  It
seems to me that they actually represent ISO-8859-1
characters (which is important if these escape
sequences occur in a unicode string literal).  Is that
the intended behavior, by the way?  Shouldn't it rather
depend on the  -*- coding -*- of the source file?

Maybe also add a reference to PEP 263?
msg22427 - (view) Author: Felix Wiemann (felixwiemann) Date: 2004-09-11 15:08
Logged In: YES 
user_id=1014490

> The documentation of \xhh and \ooo (in the same
> section) says that they represent ASCII characters. It
> seems to me that they actually represent ISO-8859-1
> characters (which is important if these escape
> sequences occur in a unicode string literal).

Correction: They represent bytes in normal strings and
\u00xx in unicode strings.
msg22428 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-14 07:52
Logged In: YES 
user_id=21627

Thanks for your report. Fixed in ref2.tex 1.55
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40898
2004-09-10 18:52:43felixwiemanncreate