Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 6,677 for WITH (0.02 seconds)

  1. docs/zh-hant/docs/tutorial/dependencies/dependencies-with-yield.md

    「情境管理器」是那些你可以在 `with` 陳述式中使用的 Python 物件。
    
    例如,[你可以用 `with` 來讀取檔案](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files):
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    在底層,`open("./somefile.txt")` 會建立一個稱為「情境管理器」的物件。
    
    當 `with` 區塊結束時,它會確保關閉檔案,即使發生了例外也一樣。
    
    當你建立一個含 `yield` 的相依時,**FastAPI** 會在內部為它建立一個情境管理器,並與其他相關工具結合。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  2. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    “上下文管理器”是你可以在 `with` 语句中使用的任意 Python 对象。
    
    例如,[你可以用 `with` 来读取文件](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files):
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    在底层,`open("./somefile.txt")` 会创建一个“上下文管理器”对象。
    
    当 `with` 代码块结束时,它会确保文件被关闭,即使期间发生了异常。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 12.1K bytes
    - Click Count (0)
  3. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    「コンテキストマネージャ」とは、`with`文の中で使用できるPythonオブジェクトのことです。
    
    例えば、[ファイルを読み込むには`with`を使用することができます](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files):
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    その後の`open("./somefile.txt")`は「コンテキストマネージャ」と呼ばれるオブジェクトを作成します。
    
    `with`ブロックが終了すると、例外があったとしてもファイルを確かに閉じます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 15.4K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    /// tip
    
    You can use `async` or regular functions.
    
    **FastAPI** will do the right thing with each, the same as with normal dependencies.
    
    ///
    
    ## A dependency with `yield` and `try` { #a-dependency-with-yield-and-try }
    
    If you use a `try` block in a dependency with `yield`, you'll receive any exception that was thrown when using the dependency.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 12.6K bytes
    - Click Count (0)
  5. docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md

    "컨텍스트 관리자"는 Python에서 `with` 문에서 사용할 수 있는 모든 객체를 의미합니다.
    
    예를 들어, [with를 사용해 파일을 읽을 수 있습니다](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files):
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    내부적으로 `open("./somefile.txt")` 는 "컨텍스트 관리자(Context Manager)"라고 불리는 객체를 생성합니다.
    
    `with` 블록이 끝나면, 예외가 발생했더라도 파일을 닫도록 보장합니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  6. docs/fr/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Gestionnaires de contexte { #context-managers }
    
    ### Que sont les « Context Managers » { #what-are-context-managers }
    
    Les « Context Managers » sont des objets Python que vous pouvez utiliser dans une instruction `with`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 13.9K bytes
    - Click Count (0)
  7. docs/es/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Context Managers { #context-managers }
    
    ### Qué son los "Context Managers" { #what-are-context-managers }
    
    Los "Context Managers" son aquellos objetos de Python que puedes usar en un `with` statement.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 13.3K bytes
    - Click Count (0)
  8. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Контекстные менеджеры { #context-managers }
    
    ### Что такое «контекстные менеджеры» { #what-are-context-managers }
    
    «Контекстные менеджеры» — это любые объекты Python, которые можно использовать в операторе `with`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 19.4K bytes
    - Click Count (0)
  9. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Kontextmanager { #context-managers }
    
    ### Was sind „Kontextmanager“ { #what-are-context-managers }
    
    „Kontextmanager“ (Englisch „Context Manager“) sind bestimmte Python-Objekte, die Sie in einer `with`-Anweisung verwenden können.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 14.4K bytes
    - Click Count (0)
  10. docs/tr/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Context Managers { #context-managers }
    
    ### "Context Managers" Nedir? { #what-are-context-managers }
    
    "Context Managers", `with` ifadesiyle kullanabildiğiniz Python nesneleridir.
    
    Örneğin, [bir dosyayı okumak için `with` kullanabilirsiniz](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files):
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 13.4K bytes
    - Click Count (0)
Back to Top