New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mistake in python documentation related to escape sequences #95994
Comments
|
The documentation could be clearer here, but what's meant is a literal newline, that is: s = "foo \
bar"Here the backslash and the newline after it are ignored. |
ezio-melotti
added a commit
to ezio-melotti/cpython
that referenced
this issue
Aug 18, 2022
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 26, 2022
* pythongh-95994: clarify escaped newlines. * Rephrase ambiguous sentence. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Use `<newline>` in escape sequences table. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit c3d591f) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
ezio-melotti
added a commit
that referenced
this issue
Aug 26, 2022
* gh-95994: clarify escaped newlines. * Rephrase ambiguous sentence. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Use `<newline>` in escape sequences table. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
miss-islington
added a commit
that referenced
this issue
Aug 26, 2022
* gh-95994: clarify escaped newlines. * Rephrase ambiguous sentence. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Use `<newline>` in escape sequences table. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> (cherry picked from commit c3d591f) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
ezio-melotti
added a commit
to ezio-melotti/cpython
that referenced
this issue
Aug 28, 2022
* pythongh-95994: clarify escaped newlines. * Rephrase ambiguous sentence. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Use `<newline>` in escape sequences table. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>. (cherry picked from commit c3d591f) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
ezio-melotti
added a commit
that referenced
this issue
Aug 28, 2022
* gh-95994: clarify escaped newlines. * Rephrase ambiguous sentence. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Use `<newline>` in escape sequences table. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>. (cherry picked from commit c3d591f) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
anupkaushal97 commentedAug 15, 2022
There is mistake related to escape sequences in Python documentation
page link: https://docs.python.org/3/reference/lexical_analysis.html#strings
it shows "\newline" with meaning "Backslash and newline ignored" while using this has no effect in code
print('Hello \newline World!')outputs: Hello
ewline World!
The text was updated successfully, but these errors were encountered: