- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 1,598 for yield (0.03 seconds)
-
docs/uk/docs/advanced/events.md
### Функція тривалості життя { #lifespan-function } Перше, на що слід звернути увагу: ми визначаємо асинхронну функцію з `yield`. Це дуже схоже на залежності з `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} Перша частина функції до `yield` буде виконана перед запуском застосунку. А частина після `yield` буде виконана після завершення роботи застосунку. ### Асинхронний менеджер контексту { #async-context-manager }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 12.2K bytes - Click Count (0) -
docs_src/dependencies/tutorial008_py310.py
dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 455 bytes - Click Count (0) -
tests/test_exception_handlers.py
} ) client = TestClient(app) def raise_value_error(): raise ValueError() def dependency_with_yield(): yield raise_value_error() @app.get("/dependency-with-yield", dependencies=[Depends(dependency_with_yield)]) def with_yield(): ... @app.get("/http-exception") def route_with_http_exception(): raise HTTPException(status_code=400)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Dec 03 22:37:12 GMT 2024 - 2.4K bytes - Click Count (0) -
tests/test_dependency_contextvars.py
client = TestClient(app) def test_dependency_contextvars(): """ Check that custom middlewares don't affect the contextvar context for dependencies. The code before yield and the code after yield should be run in the same contextvar context, so that request_state_context_var.reset(contextvar_token). If they are run in a different context, that raises an error. """
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
docs/de/docs/advanced/events.md
Das Erste, was auffällt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr ähnlich zu Abhängigkeiten mit `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} Der erste Teil der Funktion, vor dem `yield`, wird ausgeführt **bevor** die Anwendung startet. Und der Teil nach `yield` wird ausgeführt, **nachdem** die Anwendung beendet ist.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/es/docs/advanced/events.md
Lo primero que hay que notar es que estamos definiendo una función asíncrona con `yield`. Esto es muy similar a las Dependencias con `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} La primera parte de la función, antes del `yield`, será ejecutada **antes** de que la aplicación comience. Y la parte después del `yield` será ejecutada **después** de que la aplicación haya terminado.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 8.4K bytes - Click Count (0) -
docs/changelogs/changelog_4x.md
If you want this update with the old behavior use [this interceptor][legacy_interceptor]. * Fix: Don't crash decompressing web sockets messages. We had a bug where we assumed deflated bytes in would always yield deflated bytes out and this isn't always the case! * Fix: Reliably update and invalidate the disk cache on windows. As originally designed our
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/events.md
也許你要啟動新版本,或只是不想再跑它了。🤷 /// ### Lifespan 函式 { #lifespan-function } 首先要注意的是,我們定義了一個帶有 `yield` 的 async 函式。這和帶有 `yield` 的依賴(Dependencies)非常相似。 {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} 函式在 `yield` 之前的部分,會在應用啟動前先執行。 `yield` 之後的部分,會在應用結束後再執行。 ### 非同步內容管理器(Async Context Manager) { #async-context-manager } 你會看到這個函式被 `@asynccontextmanager` 裝飾。 它會把函式轉換成所謂的「**非同步內容管理器(async context manager)**」。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.2K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Predicates.java
* {@link Predicate#apply}), the returned predicate may not be <i>consistent with equals</i>. For * example, {@code instanceOf(ArrayList.class)} will yield different results for the two equal * instances {@code Lists.newArrayList(1)} and {@code Arrays.asList(1)}. * * <p><b>Discouraged:</b> Prefer using {@code clazz::isInstance} or {@code x -> x instanceofCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 26.6K bytes - Click Count (0) -
docs/zh/docs/advanced/events.md
可能你需要启动一个新版本,或者你只是厌倦了运行它。 🤷 /// ### 生命周期函数 { #lifespan-function } 首先要注意的是,我们定义了一个带有 `yield` 的异步函数。这与带有 `yield` 的依赖项非常相似。 {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} 这个函数在 `yield` 之前的部分,会在应用启动前执行。 剩下的部分在 `yield` 之后,会在应用完成后执行。 ### 异步上下文管理器 { #async-context-manager } 如你所见,这个函数有一个装饰器 `@asynccontextmanager`。 它将函数转化为所谓的“**异步上下文管理器**”。 {* ../../docs_src/events/tutorial003_py310.py hl[1,13] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 7.2K bytes - Click Count (0)