- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for Sall (0.13 sec)
-
docs/de/docs/tutorial/body-nested-models.md
Sie können einen Body auch als `dict` deklarieren, mit Schlüsseln eines Typs und Werten eines anderen Typs. So brauchen Sie vorher nicht zu wissen, wie die Feld-/Attribut-Namen lauten (wie es bei Pydantic-Modellen der Fall wäre). Das ist nützlich, wenn Sie Schlüssel empfangen, deren Namen Sie nicht bereits kennen. --- Ein anderer nützlicher Anwendungsfall ist, wenn Sie Schlüssel eines anderen Typs haben wollen, z. B. `int`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10.4K bytes - Viewed (0) -
docs/en/docs/tutorial/body-nested-models.md
In Python 3.9 it would be: ```Python my_list: list[str] ``` In versions of Python before 3.9, it would be: ```Python from typing import List my_list: List[str] ``` That's all standard Python syntax for type declarations. Use that same standard syntax for model attributes with internal types. So, in our example, we can make `tags` be specifically a "list of strings": === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.5K bytes - Viewed (0)