Issue35962
Created on 2019-02-11 10:12 by Magnien Sebastien, last changed 2022-04-11 14:59 by admin.
| Messages (7) | |||
|---|---|---|---|
| msg335205 - (view) | Author: Magnien Sebastien (Magnien Sebastien) | Date: 2019-02-11 10:12 | |
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'. " |
|||
| msg335493 - (view) | Author: Lisa Roach (lisroach) * ![]() |
Date: 2019-02-14 02:45 | |
The updated line sounds good to me, please make a PR. |
|||
| msg335526 - (view) | Author: Magnien Sebastien (Magnien Sebastien) | Date: 2019-02-14 12:28 | |
I'm all up for it; however I only ever worked on small solo projects. I don't really know where to start. Must I clone the whole python repo, or is there maybe a doc repo? |
|||
| msg335529 - (view) | Author: Rémi Lapeyre (remi.lapeyre) * | Date: 2019-02-14 13:11 | |
Hi Magnien, if you have already used Git, everything should be familiar. You have to clone the whole project, but the documentation leaves in the `Doc` folder. There is a lot of information that you can get at https://devguide.python.org/documenting/ If you get lost, please open the PR and tag me in the discussion, I will try and help you. |
|||
| msg335530 - (view) | Author: Rémi Lapeyre (remi.lapeyre) * | Date: 2019-02-14 13:12 | |
You will find the line you want to change in `Doc/reference/lexical_analysis.rst` |
|||
| msg335532 - (view) | Author: SilentGhost (SilentGhost) * ![]() |
Date: 2019-02-14 13:58 | |
I don't think that's what the sentence say at all. It says, that a backslash can be used to escape a newline character (not "n"). This refers only to triple-quoted literals and is described in the first row of the table of escape sequences below. |
|||
| msg335706 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2019-02-16 18:01 | |
I agree the current text is ambiguous given how often folks refer to the newline escape sequence as a "newline", but it isn't wrong - it's just talking about escaping literal newlines in your source code like: >>> "This is a \ ... single-line string" 'This is a single-line string' When this paragraph is being updated, it would be good to add a cross-reference down to the table of escape sequences later in the section. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:11 | admin | set | github: 80143 |
| 2022-04-08 15:59:25 | iritkatriel | set | keywords:
+ easy priority: normal -> low title: Slight error in words in [ 2.4.1. String and Bytes literals ] -> [doc] Slight error in words in [ 2.4.1. String and Bytes literals ] versions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.7, Python 3.8 |
| 2019-02-16 18:01:40 | ncoghlan | set | messages: + msg335706 |
| 2019-02-14 13:59:33 | SilentGhost | set | nosy:
+ remi.lapeyre |
| 2019-02-14 13:58:54 | SilentGhost | set | nosy:
+ SilentGhost, - remi.lapeyre messages: + msg335532 |
| 2019-02-14 13:12:38 | remi.lapeyre | set | messages: + msg335530 |
| 2019-02-14 13:11:13 | remi.lapeyre | set | nosy:
+ remi.lapeyre messages: + msg335529 |
| 2019-02-14 12:28:55 | Magnien Sebastien | set | messages: + msg335526 |
| 2019-02-14 02:45:54 | lisroach | set | nosy:
+ lisroach messages: + msg335493 |
| 2019-02-13 01:44:15 | cheryl.sabella | set | nosy:
+ ncoghlan versions: + Python 3.8 |
| 2019-02-11 10:12:39 | Magnien Sebastien | create | |

