ur'strings' are syntax errors in Python 3

This commit is contained in:
cclauss
2019-01-17 16:30:16 +01:00
parent 089817cf55
commit 9a0c995885
5 changed files with 18 additions and 18 deletions

View File

@@ -13,14 +13,14 @@ def quote_slashes(text):
';;'. By making the escape sequence fixed length, and escaping
identifier character ';', we are able to reverse the escaping.
"""
return re.sub(ur'[;/]', _quote_slashes, text)
return re.sub(r'[;/]', _quote_slashes, text)
def unquote_slashes(text):
"""
Unquote slashes quoted by `quote_slashes`
"""
return re.sub(r'(;;|;_)', _unquote_slashes, text)
return re.sub(u'(;;|;_)', _unquote_slashes, text)
def _quote_slashes(match):