Skip to content

# in raw triple quote string #194

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

Closed
verhovsky opened this issue Dec 29, 2019 · 5 comments
Closed

# in raw triple quote string #194

verhovsky opened this issue Dec 29, 2019 · 5 comments
Assignees

Comments

@verhovsky
Copy link

https://github.com/python/cpython/blob/be287c319124b7eb59ef32b69cf837ae3e99acab/Lib/string.py#L31

this line

punctuation = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""

has a # symbol in a r""" string, and the rest of the characters are highlighted as if it's a comment.

@verhovsky
Copy link
Author

verhovsky commented Dec 29, 2019

Looks like this is related to #114 (comment)

punctuation = R"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""

Please reconsider this feature.

@elprans
Copy link
Member

elprans commented Dec 29, 2019

This doesn't seem right even in regex mode. The syntax for regexp comments is (?#...), # on its own is not sufficient.

@1st1
Copy link
Member

1st1 commented Dec 29, 2019

# on its own is a comment. Check it.

@1st1
Copy link
Member

1st1 commented Dec 29, 2019

At least with re.X

@elprans
Copy link
Member

elprans commented Dec 29, 2019

Yes, you're right.

@elprans elprans closed this as completed Dec 29, 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

No branches or pull requests

4 participants