New submission from Magnien Sebastien <s.magn...@gmail.com>:

The documentation reads :

" The backslash (\) character is used to escape characters that otherwise have 
a special meaning, such as newline, backslash itself, or the quote character. "

However, 'n' does not "otherwise have a special meaning", nor does it represent 
a new line.

The backslash character does in fact do two different things :

1) It removes special meanings from characters that have one (\\).
2) It assigns a special meaning to normal characters (\n).

A better description would therefore be :

" The backslash (\) character is used to either escape characters that have a 
special meaning, such as backslash itself, or the quote character - or give 
special meaning to characters that do not have one, such as 'n', whose 
escapment '\n' means 'newline'. "

----------
assignee: docs@python
components: Documentation
messages: 335205
nosy: Magnien Sebastien, docs@python
priority: normal
severity: normal
status: open
title: Slight error in words in [ 2.4.1. String and Bytes literals ]
type: enhancement
versions: Python 2.7, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35962>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to