Browse Source

Open

pull/10/head
Jure Šorn 5 years ago
parent
commit
7d8c5da8a3
1 changed files with 9 additions and 9 deletions
  1. 18
      README.md

18
README.md

@ -890,7 +890,7 @@ while True:
#### Modes: #### Modes:
* `'r'` - read (default) * `'r'` - read (default)
* `'w'` - write (truncate) * `'w'` - write (truncate)
* `'x'` - write or fail if the file already exists
* `'x'` - write or fail if file already exists
* `'a'` - append * `'a'` - append
* `'w+'` - read and write (truncate) * `'w+'` - read and write (truncate)
* `'r+'` - read and write from beginning * `'r+'` - read and write from beginning
@ -899,18 +899,18 @@ while True:
* `'t'` - text mode (default) * `'t'` - text mode (default)
#### Newline - input: #### Newline - input:
* `None` - Input is broken on '\n', '\r' and '\r\n'. '\r' and '\r\n' are translated to '\n'.
* `''` - Input is broken on '\n', '\r' and '\r\n'.
* `'\n'` - Input is broken on '\n'.
* `'\r'` - Input is broken on '\r'.
* `'\r\n'` - Input is broken on '\r\n'.
* `None` - Input is broken on `'\n'`, `'\r'` and `'\r\n'`. `'\r'` and `'\r\n'` are translated to `'\n'`.
* `''` - Input is broken on `'\n'`, `'\r'` and `'\r\n'`.
* `'\n'` - Input is broken on `'\n'`.
* `'\r'` - Input is broken on `'\r'`.
* `'\r\n'` - Input is broken on `'\r\n'`.
#### Newline - output: #### Newline - output:
* `None` - Any '\n' is translated to system default line separator.
* `None` - Any `'\n'` is translated to system default line separator.
* `''` - No translation. * `''` - No translation.
* `'\n'` - No translation. * `'\n'` - No translation.
* `'\r'` - Any '\n' is translated to '\r'.
* `'\r\n'` - Any '\n' is translated to '\r\n'
* `'\r'` - Any `'\n'` is translated to `'\r'`.
* `'\r\n'` - Any `'\n'` is translated to `'\r\n'`.
#### Read Text from File: #### Read Text from File:
```python ```python

Loading…
Cancel
Save