Browse Source

System

pull/10/head
Jure Šorn 5 years ago
parent
commit
6854285a72
1 changed files with 1 additions and 15 deletions
  1. 16
      README.md

16
README.md

@ -884,7 +884,7 @@ while True:
**Opens file and returns a corresponding file object.** **Opens file and returns a corresponding file object.**
```python ```python
<file> = open(<path>, mode='r', encoding=None, newline=None)
<file> = open(<path>, mode='r', encoding=None)
``` ```
#### Modes: #### Modes:
@ -898,20 +898,6 @@ while True:
* **`'b'` - Binary mode.** * **`'b'` - Binary mode.**
* **`'t'` - Text mode (default).** * **`'t'` - Text mode (default).**
#### Newline - input:
* **`'None'` - Input is broken on `'\n'`, `'\r'` and `'\r\n'`. `'\r'` and `'\r\n'` are translated to `'\n'` (default).**
* **`''` - 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:
* **`'None'` - Any `'\n'` is translated to system default line separator (default).**
* **`''` - No translation.**
* **`'\n'` - No translation.**
* **`'\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
def read_file(filename): def read_file(filename):

Loading…
Cancel
Save