| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,7 @@ | |||
| 53 | 53 | sequence must be accessed in strictly sequential order; sequence | |
| 54 | 54 | access and readline() cannot be mixed. | |
| 55 | 55 | ||
| 56 | - Optional in-place filtering: if the keyword argument inplace=1 is | ||
| 56 | + Optional in-place filtering: if the keyword argument inplace=True is | ||
| 57 | 57 | passed to input() or to the FileInput constructor, the file is moved | |
| 58 | 58 | to a backup file and standard output is directed to the input file. | |
| 59 | 59 | This makes it possible to write a filter that rewrites its input file | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -151,7 +151,7 @@ def test_buffer_sizes(self): | |||
| 151 | 151 | print('6. Inplace') | |
| 152 | 152 | savestdout = sys.stdout | |
| 153 | 153 | try: | |
| 154 | - fi = FileInput(files=(t1, t2, t3, t4), inplace=1, encoding="utf-8") | ||
| 154 | + fi = FileInput(files=(t1, t2, t3, t4), inplace=True, encoding="utf-8") | ||
| 155 | 155 | for line in fi: | |
| 156 | 156 | line = line[:-1].upper() | |
| 157 | 157 | print(line) | |
@@ -256,7 +256,7 @@ def test_detached_stdin_binary_mode(self): | |||
| 256 | 256 | def test_file_opening_hook(self): | |
| 257 | 257 | try: | |
| 258 | 258 | # cannot use openhook and inplace mode | |
| 259 | - fi = FileInput(inplace=1, openhook=lambda f, m: None) | ||
| 259 | + fi = FileInput(inplace=True, openhook=lambda f, m: None) | ||
| 260 | 260 | self.fail("FileInput should raise if both inplace " | |
| 261 | 261 | "and openhook arguments are given") | |
| 262 | 262 | except ValueError: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments