- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,631 for yield (0.05 sec)
-
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
# Dependencies with yield FastAPI supports dependencies that do some <abbr title='sometimes also called "exit code", "cleanup code", "teardown code", "closing code", "context manager exit code", etc.'>extra steps after finishing</abbr>. To do this, use `yield` instead of `return`, and write the extra steps (code) after. !!! tip Make sure to use `yield` one single time. !!! note "Technical Details" Any function that is valid to use with:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 14.1K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
# Abhängigkeiten mit yield FastAPI unterstützt Abhängigkeiten, die nach Abschluss einige <abbr title="Manchmal auch genannt „Exit Code“, „Cleanup Code“, „Teardown Code“, „Closing Code“, „Kontext Manager Exit Code“, usw.">zusätzliche Schritte ausführen</abbr>. Verwenden Sie dazu `yield` statt `return` und schreiben Sie die zusätzlichen Schritte / den zusätzlichen Code danach. !!! tip "Tipp" Stellen Sie sicher, dass Sie `yield` nur einmal pro Abhängigkeit verwenden.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 18:10:29 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** использует их "под капотом" с этой целью. ## Зависимости с `yield` и `HTTPException` Вы видели, что можно использовать зависимости с `yield` совместно с блоком `try`, отлавливающие исключения. Таким же образом вы можете поднять исключение `HTTPException` или что-то подобное в завершающем коде, после `yield`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 04:21:06 UTC 2024 - 19.6K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md
在 `yield` 后抛出 `HTTPException` 或类似的异常是很诱人的,但是**这不起作用**。 带有`yield`的依赖中的退出代码在响应发送之后执行,因此[异常处理程序](../handling-errors.md#install-custom-exception-handlers){.internal-link target=_blank}已经运行过。没有任何东西可以捕获退出代码(在`yield`之后)中的依赖抛出的异常。 所以,如果在`yield`之后抛出`HTTPException`,默认(或任何自定义)异常处理程序捕获`HTTPException`并返回HTTP 400响应的机制将不再能够捕获该异常。 这就是允许在依赖中设置的任何东西(例如数据库会话(DB session))可以被后台任务使用的原因。 后台任务在响应发送之后运行。因此,无法触发`HTTPException`,因为甚至没有办法更改*已发送*的响应。
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 10.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** はこれを実現するために内部的に使用しています。 ## `yield`と`HTTPException`を持つ依存関係 `yield`と例外をキャッチする`try`ブロックを持つことができる依存関係を使用することができることがわかりました。 `yield`の後の終了コードで`HTTPException`などを発生させたくなるかもしれません。しかし**それはうまくいきません** `yield`を持つ依存関係の終了コードは[例外ハンドラ](../handling-errors.md#_4){.internal-link target=_blank}の*後に*実行されます。依存関係によって投げられた例外を終了コード(`yield`の後)でキャッチするものはなにもありません。
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/executor_island_coarsening.mlir
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 28 12:06:33 UTC 2022 - 17.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/executor_canonicalize.mlir
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Nov 04 14:07:37 UTC 2022 - 13.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/region-control-flow-to-functional.mlir
%2 = "tf.Abs"(%asin) : (tensor<*xf32>) -> tensor<*xf32> "tf.Yield"(%2) : (tensor<*xf32>) -> () }, { %2 = "tf.Neg"(%arg1) : (tensor<*xf32>) -> tensor<*xf32> "tf.Yield"(%2) : (tensor<*xf32>) -> () }) { is_stateless = true } : (tensor<i1>) -> tensor<*xf32> "tf.Yield"(%1) : (tensor<*xf32>) -> () }, { // Outer Else
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Feb 02 11:15:34 UTC 2024 - 44.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/breakup-islands.mlir
tf_executor.yield %add1, %add2 : tensor<*xi32>, tensor<*xi32> } %island2:3 = tf_executor.island(%island1#2) { %sub = "tf.Sub"(%arg0, %arg1) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi32> %mul = "tf.Mul"(%sub, %arg1) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi32> tf_executor.yield %sub, %mul : tensor<*xi32>, tensor<*xi32> }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 31 08:59:10 UTC 2023 - 28.5K bytes - Viewed (0) -
src/iter/pull_test.go
import ( "fmt" . "iter" "runtime" "testing" ) func count(n int) Seq[int] { return func(yield func(int) bool) { for i := range n { if !yield(i) { break } } } } func squares(n int) Seq2[int, int64] { return func(yield func(int, int64) bool) { for i := range n { if !yield(i, int64(i)*int64(i)) { break } } } } func TestPull(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:09:28 UTC 2024 - 10.2K bytes - Viewed (0)