Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(48739)

Unified Diff: Lib/fileinput.py

Issue 25788: fileinput.hook_encoded has no way to pass arguments to codecs
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Lib/fileinput.py Mon Feb 01 12:47:15 2016 +0100
+++ b/Lib/fileinput.py Wed Apr 27 12:07:21 2016 -0400
@@ -412,9 +412,9 @@
return open(filename, mode)
-def hook_encoded(encoding):
+def hook_encoded(encoding, errors=None):
def openhook(filename, mode):
- return open(filename, mode, encoding=encoding)
+ return open(filename, mode, encoding=encoding, errors=errors)
return openhook
« Doc/whatsnew/3.6.rst ('K') | « Doc/whatsnew/3.6.rst ('k') | Lib/test/test_fileinput.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+