Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for putString (0.14 sec)

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

        ```
    
    ### `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
    some_variable: PlaneItem | CarItem
    ```
    
    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)
Back to top