Browse Source

Open modes

pull/10/head
Jure Šorn 6 years ago
parent
commit
71732572f1
1 changed files with 9 additions and 9 deletions
  1. 18
      README.md

18
README.md

@ -888,15 +888,15 @@ while True:
``` ```
#### Modes: #### Modes:
* `'r'` - Read (default). * **`'r'` - Read (default).**
* `'w'` - Write (truncate). * **`'w'` - Write (truncate).**
* `'x'` - Write or fail if file already exists. * **`'x'` - Write or fail if the 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 the beginning.**
* `'a+'` - Read and write from the end. * **`'a+'` - Read and write from the end.**
* `'b'` - Binary mode. * **`'b'` - Binary mode.**
* `'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'`. * `'None'` - Input is broken on `'\n'`, `'\r'` and `'\r\n'`. `'\r'` and `'\r\n'` are translated to `'\n'`.

|||||||
100:0
Loading…
Cancel
Save