- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 973 for yield (0.04 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/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) -
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) -
tensorflow/compiler/mlir/tensorflow/tests/mark_ops_for_outside_compilation.mlir
%2 = "tf.IfRegion"(%arg0) ({ %3 = "tf.StringToNumber"(%arg1) {out_type = f32} : (tensor<!tf_type.string>) -> tensor<f32> "tf.Yield"(%3) : (tensor<f32>) -> () }, { %4 = "tf.Const"() {value = dense<1.0> : tensor<f32>} : () -> tensor<f32> "tf.Yield"(%4) : (tensor<f32>) -> () }) {is_stateless = true} : (tensor<i1>) -> (tensor<f32>) %5 = "tf.Identity"(%2) : (tensor<f32>) -> tensor<f32>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 16:22:32 UTC 2024 - 29.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/tests/tfl_while_outline.mlir
"tfl.yield"(%1) : (tensor<i1>) -> () }, { ^bb0(%arg0: tensor<*xi32>, %arg1: tensor<*xf32>): // CHECK: call @WhileOp_body // CHECK-SAME: (tensor<*xi32>, tensor<*xf32>, tensor<i32>) %1:3 = func.call @WhileOp_body(%arg0, %arg1, %cst) : (tensor<*xi32>, tensor<*xf32>, tensor<i32>) -> (tensor<*xi32>, tensor<*xf32>, tensor<i32>) "tfl.yield"(%1#0, %1#1) : (tensor<*xi32>, tensor<*xf32>) -> ()
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 13.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc
auto it = block.rbegin(); YieldOp yield = dyn_cast<YieldOp>(*it++); if (it == block.rend()) return std::nullopt; // Operation which is expected to consume all the call results. Operation* call_consumer = yield; // Allow a single ToBoolOp between the call and the yield (valid only // when the yield has a single operand) if (allow_to_bool && yield.getNumOperands() == 1 && isa<ToBoolOp>(*it)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0)