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

The raw string r'\' fails #46276

Closed
passage mannequin opened this issue Jan 31, 2008 · 2 comments
Closed

The raw string r'\' fails #46276

passage mannequin opened this issue Jan 31, 2008 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@passage
Copy link
Mannequin

passage mannequin commented Jan 31, 2008

BPO 1984
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-01-31.23:26:17.463>
created_at = <Date 2008-01-31.22:26:01.793>
labels = ['interpreter-core', 'type-bug']
title = "The raw string r'\\' fails"
updated_at = <Date 2008-01-31.23:26:17.456>
user = 'https://bugs.python.org/passage'

bugs.python.org fields:

activity = <Date 2008-01-31.23:26:17.456>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = <Date 2008-01-31.23:26:17.463>
closer = 'georg.brandl'
components = ['Interpreter Core']
creation = <Date 2008-01-31.22:26:01.793>
creator = 'passage'
dependencies = []
files = []
hgrepos = []
issue_num = 1984
keywords = []
message_count = 2.0
messages = ['61936', '61940']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'passage']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1984'
versions = ['Python 2.5']

@passage
Copy link
Mannequin Author

passage mannequin commented Jan 31, 2008

Python's raw strings are supposed to prevent characters being
interpreted as special. However entering the raw string r'\' into an
interactive session will result in:

Traceback ( File "<interactive input>", line 1
r'\'
^
SyntaxError: EOL while scanning single-quoted string

Python seems to have escaped the close of the string, even though raw
strings are not supposed to ever escape characters.

@passage passage mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Jan 31, 2008
@birkenfeld
Copy link
Member

This is not easily fixable -- it has been discussed several times on
python-dev and won't change.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant