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: Null byte \0 not listed as a possible escape sequence
Type: Stage:
Components: Documentation Versions: Python 3.0, Python 2.4, Python 2.3, Python 3.1, Python 2.2.3, Python 2.7, Python 2.6, Python 2.2.2, Python 2.5, Python 2.2.1, Python 2.2, Python 2.1.2, Python 2.1.1
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, voket
Priority: normal Keywords:

Created on 2008-08-20 23:04 by voket, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg71590 - (view) Author: Matt Aasted (voket) Date: 2008-08-20 23:04
In current, future and past documentation, the valid escape sequence \0
(equivalent to \x00) is missing from the list of possible escape
sequences in the documentation. As far as I can tell, it is not a case
covered by any of the other elements in the list, and is valid python
though I have only tested current (2.5.2) for it.

Current version can be found here: http://docs.python.org/ref/strings.html
msg71609 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-08-21 06:58
The \0 falls under this case:

\ooo  	Character with octal value ooo

where the note says "As in Standard C, up to three octal digits are
accepted. "
History
Date User Action Args
2022-04-11 14:56:37adminsetgithub: 47874
2008-08-21 06:58:19georg.brandlsetstatus: open -> closed
resolution: works for me
messages: + msg71609
2008-08-20 23:04:03voketcreate