Skip to content

Commit 64787ef

Browse files
author
Clar Charr
committed
Use raw strings for regex in unicode.py
1 parent 5d3d5e3 commit 64787ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/unicode/unicode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ def format_table_content(f, content, indent):
240240
def load_properties(f, interestingprops):
241241
fetch(f)
242242
props = {}
243-
re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
244-
re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
243+
re1 = re.compile(r"^ *([0-9A-F]+) *; *(\w+)")
244+
re2 = re.compile(r"^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
245245

246246
for line in fileinput.input(os.path.basename(f)):
247247
prop = None
@@ -466,7 +466,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
466466
# download and parse all the data
467467
fetch("ReadMe.txt")
468468
with open("ReadMe.txt") as readme:
469-
pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
469+
pattern = r"for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
470470
unicode_version = re.search(pattern, readme.read()).groups()
471471
rf.write("""
472472
/// The version of [Unicode](http://www.unicode.org/) that the Unicode parts of

0 commit comments

Comments
 (0)