Skip to content
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

Update README.md #88

Closed
wants to merge 1 commit into from
Closed

Update README.md #88

wants to merge 1 commit into from

Conversation

ashish4321
Copy link

Added Explanation for Backslash at the end of string
Issue number #69

Added Explanation for Backslash at the end of string
@ashish4321
Copy link
Author

Pls check for issue number #69

@ashish4321
Copy link
Author

Is it okay?

- String quotes can be escaped with a backslash, but the backslash remains in the string; for example, r""" is a valid string literal consisting of two characters: a backslash and a double quote; r"" is not a valid string literal (even a raw string cannot end in an odd number of backslashes). Specifically, a raw string cannot end in a single backslash (since the backslash would escape the following quote character). Note also that a single backslash followed by a newline is interpreted as those two characters as part of the string, not as a line continuation.
Few examples :

>>> print(r"\"")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, the examples should be displayed like other examples in the repo. You can scroll through the readme to have an idea :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But i have added what you asked to add

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, I didn't ask anyone anything to add..

\"
>>> print(r"A\nB")
A\nB
>>> print(r"A\\nB")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about having an explanation after every triggering statement. Kind of like getting into more detailed explanation with each output. Hope you get it :)

@ashish4321 ashish4321 closed this Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants