Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for argument (0.18 sec)

  1. docs/en/docs/tutorial/extra-models.md

        {!> ../../../docs_src/extra_models/tutorial003.py!}
        ```
    
    ### `Union` in Python 3.10
    
    In this example we pass `Union[PlaneItem, CarItem]` as the value of the argument `response_model`.
    
    Because we are passing it as a **value to an argument** instead of putting it in a **type annotation**, we have to use `Union` even in Python 3.10.
    
    If it was in a type annotation we could have used the vertical bar, as:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  2. docs/pt/docs/tutorial/extra-models.md

        {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
        ```
    
    ### `Union` no Python 3.10
    
    Neste exemplo, passamos `Union[PlaneItem, CarItem]` como o valor do argumento `response_model`.
    
    Dado que estamos passando-o como um **valor para um argumento** em vez de colocá-lo em uma **anotação de tipo**, precisamos usar `Union` mesmo no Python 3.10.
    
    Se estivesse em uma anotação de tipo, poderíamos ter usado a barra vertical, como:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/extra-models.md

        {!> ../../../docs_src/extra_models/tutorial003.py!}
        ```
    
    ### `Union` in Python 3.10
    
    In diesem Beispiel übergeben wir dem Argument `response_model` den Wert `Union[PlaneItem, CarItem]`.
    
    Da wir es als **Wert einem Argument überreichen**, statt es als **Typannotation** zu verwenden, müssen wir `Union` verwenden, selbst in Python 3.10.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
Back to top