Skip to content

Commit c4f1537

Browse files
committed
Open
1 parent 8a4adc4 commit c4f1537

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ Open
14791479
```
14801480
* **`'encoding=None'` means default encoding is used, which is platform dependent. Best practice is to use `'encoding="utf-8"'` whenever possible.**
14811481
* **`'newline=None'` means all different end of line combinations are converted to '\n' on read, while on write all '\n' characters are converted to system's default line separator.**
1482-
* **`'newline=""'` means no conversions take place, but lines are still broken by readline() on either '\n', '\r' or '\r\n'.**
1482+
* **`'newline=""'` means no conversions take place, but input is still broken into chunks by readline() and readlines() on either '\n', '\r' or '\r\n'.**
14831483

14841484
### Modes
14851485
* **`'r'` - Read (default).**
@@ -1509,7 +1509,7 @@ Open
15091509
```python
15101510
<str/bytes> = <file>.read(size=-1) # Reads 'size' chars/bytes or until EOF.
15111511
<str/bytes> = <file>.readline() # Returns a line or empty string on EOF.
1512-
<list> = <file>.readlines() # Returns a list of lines or empty list.
1512+
<list> = <file>.readlines() # Returns a list of remaining lines.
15131513
<str/bytes> = next(<file>) # Returns a line using buffer. Do not mix.
15141514
```
15151515

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@
13561356
<ul>
13571357
<li><strong><code class="python hljs"><span class="hljs-string">'encoding=None'</span></code> means default encoding is used, which is platform dependent. Best practice is to use <code class="python hljs"><span class="hljs-string">'encoding="utf-8"'</span></code> whenever possible.</strong></li>
13581358
<li><strong><code class="python hljs"><span class="hljs-string">'newline=None'</span></code> means all different end of line combinations are converted to '\n' on read, while on write all '\n' characters are converted to system's default line separator.</strong></li>
1359-
<li><strong><code class="python hljs"><span class="hljs-string">'newline=""'</span></code> means no conversions take place, but lines are still broken by readline() on either '\n', '\r' or '\r\n'.</strong></li>
1359+
<li><strong><code class="python hljs"><span class="hljs-string">'newline=""'</span></code> means no conversions take place, but input is still broken into chunks by readline() and readlines() on either '\n', '\r' or '\r\n'.</strong></li>
13601360
</ul>
13611361
<div><h3 id="modes">Modes</h3><ul>
13621362
<li><strong><code class="python hljs"><span class="hljs-string">'r'</span></code> - Read (default).</strong></li>
@@ -1385,7 +1385,7 @@
13851385

13861386
<pre><code class="python language-python hljs">&lt;str/bytes&gt; = &lt;file&gt;.read(size=<span class="hljs-number">-1</span>) <span class="hljs-comment"># Reads 'size' chars/bytes or until EOF.</span>
13871387
&lt;str/bytes&gt; = &lt;file&gt;.readline() <span class="hljs-comment"># Returns a line or empty string on EOF.</span>
1388-
&lt;list&gt; = &lt;file&gt;.readlines() <span class="hljs-comment"># Returns a list of lines or empty list.</span>
1388+
&lt;list&gt; = &lt;file&gt;.readlines() <span class="hljs-comment"># Returns a list of remaining lines.</span>
13891389
&lt;str/bytes&gt; = next(&lt;file&gt;) <span class="hljs-comment"># Returns a line using buffer. Do not mix.</span>
13901390
</code></pre>
13911391
<pre><code class="python language-python hljs">&lt;file&gt;.write(&lt;str/bytes&gt;) <span class="hljs-comment"># Writes a string or bytes object.</span>

0 commit comments

Comments
 (0)