From c4f153794269ffc9f0d22b9bb6a2fd7368befdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 21 Jul 2019 12:09:05 +0200 Subject: [PATCH] Open --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc613d8..e80267e 100644 --- a/README.md +++ b/README.md @@ -1479,7 +1479,7 @@ Open ``` * **`'encoding=None'` means default encoding is used, which is platform dependent. Best practice is to use `'encoding="utf-8"'` whenever possible.** * **`'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.** -* **`'newline=""'` means no conversions take place, but lines are still broken by readline() on either '\n', '\r' or '\r\n'.** +* **`'newline=""'` means no conversions take place, but input is still broken into chunks by readline() and readlines() on either '\n', '\r' or '\r\n'.** ### Modes * **`'r'` - Read (default).** @@ -1509,7 +1509,7 @@ Open ```python = .read(size=-1) # Reads 'size' chars/bytes or until EOF. = .readline() # Returns a line or empty string on EOF. - = .readlines() # Returns a list of lines or empty list. + = .readlines() # Returns a list of remaining lines. = next() # Returns a line using buffer. Do not mix. ``` diff --git a/index.html b/index.html index 1ca46a6..b4ec7d2 100644 --- a/index.html +++ b/index.html @@ -1356,7 +1356,7 @@ value = args.<name>
  • 'encoding=None' means default encoding is used, which is platform dependent. Best practice is to use 'encoding="utf-8"' whenever possible.
  • '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.
  • -
  • 'newline=""' means no conversions take place, but lines are still broken by readline() on either '\n', '\r' or '\r\n'.
  • +
  • 'newline=""' means no conversions take place, but input is still broken into chunks by readline() and readlines() on either '\n', '\r' or '\r\n'.

Modes

  • 'r' - Read (default).
  • @@ -1385,7 +1385,7 @@ value = args.<name>
    <str/bytes> = <file>.read(size=-1)  # Reads 'size' chars/bytes or until EOF.
     <str/bytes> = <file>.readline()     # Returns a line or empty string on EOF.
    -<list>      = <file>.readlines()    # Returns a list of lines or empty list.
    +<list>      = <file>.readlines()    # Returns a list of remaining lines.
     <str/bytes> = next(<file>)          # Returns a line using buffer. Do not mix.
     
    <file>.write(<str/bytes>)           # Writes a string or bytes object.