Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for files (0.28 sec)

  1. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    ## コンテキストマネージャ
    
    ### 「コンテキストマネージャ」とは
    
    「コンテキストマネージャ」とは、`with`文の中で使用できるPythonオブジェクトのことです。
    
    例えば、<a href="https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">ファイルを読み込むには`with`を使用することができます</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    „Kontextmanager“ (Englisch „Context Manager“) sind bestimmte Python-Objekte, die Sie in einer `with`-Anweisung verwenden können.
    
    Beispielsweise können Sie <a href="https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">`with` verwenden, um eine Datei auszulesen</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:10:29 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Underneath, the `open("./somefile.txt")` creates an object that is called a "Context Manager".
    
    When the `with` block finishes, it makes sure to close the file, even if there were exceptions.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    ### Что такое "контекстные менеджеры"
    
    "Контекстные менеджеры" - это любые объекты Python, которые можно использовать в операторе `with`.
    
    Например, <a href="https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">можно использовать `with` для чтения файла</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:21:06 GMT 2024
    - 19.6K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    ## 上下文管理器
    
    ### 什么是“上下文管理器”
    
    “上下文管理器”是您可以在`with`语句中使用的任何Python对象。
    
    例如,<a href="https://docs.python.org/zh-cn/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">您可以使用`with`读取文件</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    在底层,`open("./somefile.txt")`创建了一个被称为“上下文管理器”的对象。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.3K bytes
    - Viewed (0)
Back to top