diff --git a/README.md b/README.md index 3cb06d9..fe9bb3d 100644 --- a/README.md +++ b/README.md @@ -1429,7 +1429,7 @@ value = args. Open ---- -**Opens a file and returns a corresponding file object or raises 'FileNotFoundError'.** +**Opens a file and returns a corresponding file object.** ```python = open('', mode='r', encoding=None, newline=None) @@ -1449,6 +1449,10 @@ Open * **`'t'` - Text mode (default).** * **`'b'` - Binary mode.** +### Exceptions +* **`'FileNotFoundError'` can be risen when reading with `'r'` or `'r+'`.** +* **`'FileExistsError'` can be risen when writing with `'x'`.** + ### File ```python .seek(0) # Moves to the start of the file. diff --git a/index.html b/index.html index 3b4134c..7b1e401 100644 --- a/index.html +++ b/index.html @@ -1307,7 +1307,7 @@ value = args.<name>
  • Use 'type=FileType(<mode>)' for files.
  • #Open

    -

    Opens a file and returns a corresponding file object or raises 'FileNotFoundError'.

    +

    Opens a file and returns a corresponding file object.

    <file> = open('<path>', mode='r', encoding=None, newline=None)
     
      @@ -1327,6 +1327,11 @@ value = args.<name>
    • 't' - Text mode (default).
    • 'b' - Binary mode.
    +

    Exceptions

    +
      +
    • 'FileNotFoundError' can be risen when reading with 'r' or 'r+'.
    • +
    • 'FileExistsError' can be risen when writing with 'x'.
    • +

    File

    <file>.seek(0)                      # Moves to the start of the file.
     <file>.seek(offset)                 # Moves 'offset' chars/bytes from the start.
    @@ -1809,7 +1814,7 @@ logger.<level>('A logging message.')
     
    • Levels: 'debug', 'info', 'success', 'warning', 'error', 'critical'.
    -

    Exceptions

    +

    Exceptions

    Error description, stack trace and values of variables are appended automatically.

    try:
         ...