Skip to content

Mark pattern as raw string#38

Open
jm-rivera wants to merge 1 commit intotgherzog:masterfrom
jm-rivera:rawstring-fix
Open

Mark pattern as raw string#38
jm-rivera wants to merge 1 commit intotgherzog:masterfrom
jm-rivera:rawstring-fix

Conversation

@jm-rivera
Copy link

As noted in #37:
Python string literals interpret \ as an escape character unless the string is marked as a raw string (with prefix r). Adding r just before the string fixes the problem.

Since 3.12, this now emits a syntax warning, noting that it will eventually raise a syntax error.
https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

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.

1 participant