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.

Title: Prohibit invisible control characters in string literals and comments
Type: security Stage:
Components: Interpreter Core Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, steven.daprano
Priority: normal Keywords:

Created on 2021-11-15 23:11 by steven.daprano, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg406370 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2021-11-15 23:11
Currently invisible control characters aside from whitespace (tabs, newlines, formfeeds, carriage returns) are prohibited outside of comments and string literals. As discussed in this thread:

we should ban C0 and C1 control characters (aside from \t\n\f\r) in string literals and comments too.

To be clear, the ban is on actual invisible control characters, not escape sequences.
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89968
2021-11-15 23:11:24steven.dapranocreate