- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 54 for union_ (0.05 seconds)
-
docs/de/docs/advanced/advanced-python-types.md
Hier sind einige zusätzliche Ideen, die beim Arbeiten mit Python-Typen nützlich sein könnten. ## `Union` oder `Optional` verwenden { #using-union-or-optional } Wenn Ihr Code aus irgendeinem Grund nicht `|` verwenden kann, z. B. wenn es nicht in einer Typannotation ist, sondern in etwas wie `response_model=`, können Sie anstelle des senkrechten Strichs (`|`) `Union` aus `typing` verwenden.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 07:57:30 GMT 2026 - 2.3K bytes - Click Count (0) -
docs/fr/docs/advanced/advanced-python-types.md
## Utiliser `Union` ou `Optional` { #using-union-or-optional } Si votre code ne peut pas utiliser `|` pour une raison quelconque, par exemple si ce n'est pas dans une annotation de type mais dans quelque chose comme `response_model=`, au lieu d'utiliser la barre verticale (`|`) vous pouvez utiliser `Union` de `typing`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:12:41 GMT 2026 - 2.3K bytes - Click Count (0) -
docs/en/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` in Python 3.10 { #union-in-python-3-10 }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/pt/docs/advanced/advanced-python-types.md
## Usando `Union` ou `Optional` { #using-union-or-optional } Se, por algum motivo, seu código não puder usar `|`, por exemplo, se não for em uma anotação de tipo, mas em algo como `response_model=`, em vez de usar a barra vertical (`|`) você pode usar `Union` do `typing`. Por exemplo, você poderia declarar que algo pode ser `str` ou `None`: ```python from typing import Union def say_hi(name: Union[str, None]):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:48:53 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/en/docs/advanced/advanced-python-types.md
## Using `Union` or `Optional` { #using-union-or-optional } If your code for some reason can't use `|`, for example if it's not in a type annotation but in something like `response_model=`, instead of using the vertical bar (`|`) you can use `Union` from `typing`. For example, you could declare that something could be a `str` or `None`: ```python from typing import Union def say_hi(name: Union[str, None]):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 2K bytes - Click Count (0) -
docs/es/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` en Python 3.10 { #union-in-python-3-10 }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/fr/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` en Python 3.10 { #union-in-python-3-10 }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 7.6K bytes - Click Count (0) -
docs/uk/docs/tutorial/extra-models.md
/// {* ../../docs_src/extra_models/tutorial003_py310.py hl[1,14:15,18:20,33] *} ### `Union` у Python 3.10 { #union-in-python-3-10 } У цьому прикладі ми передаємо `Union[PlaneItem, CarItem]` як значення аргументу `response_model`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/extra-models.md
## `Union` 或 `anyOf` { #union-or-anyof } 响应可以声明为两个或多个类型的 `Union`,即该响应可以是这些类型中的任意一种。 在 OpenAPI 中会用 `anyOf` 表示。 为此,请使用 Python 标准类型提示 [`typing.Union`](https://docs.python.org/3/library/typing.html#typing.Union): /// note | 注意Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6.5K bytes - Click Count (0) -
docs/es/docs/advanced/advanced-python-types.md
## Usar `Union` u `Optional` { #using-union-or-optional } Si por alguna razón tu código no puede usar `|`, por ejemplo si no está en una anotación de tipos sino en algo como `response_model=`, en lugar de usar la barra vertical (`|`) puedes usar `Union` de `typing`. Por ejemplo, podrías declarar que algo podría ser un `str` o `None`: ```python from typing import Union def say_hi(name: Union[str, None]):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:41:41 GMT 2026 - 2.1K bytes - Click Count (0)