diff options
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index 8af4a57..81a7545 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -315,7 +315,10 @@ class FileInput: return line if not self._file: if not self._files: - return "" + if 'b' in self._mode: + return b'' + else: + return '' self._filename = self._files[0] self._files = self._files[1:] self._filelineno = 0 |