mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
add encoding parameter to all file open() calls in code samples, example files, and text
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ def build_match_and_apply_functions(pattern, search, replace):
|
||||
return [matches_rule, apply_rule]
|
||||
|
||||
rules = []
|
||||
with open('plural4-rules.txt') as pattern_file:
|
||||
with open('plural4-rules.txt', encoding='utf-8') as pattern_file:
|
||||
for line in pattern_file:
|
||||
pattern, search, replace = line.split(None, 3)
|
||||
rules.append(build_match_and_apply_functions(
|
||||
|
||||
Reference in New Issue
Block a user