Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for tuple (0.18 sec)

  1. docs/tr/docs/python-types.md

    #### `Tuple` ve `Set`
    
    `Tuple` ve `set`lerin tiplerini bildirmek için de aynısını yapıyoruz:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial007.py!}
    ```
    
    Bu şu anlama geliyor:
    
    * `items_t` değişkeni sırasıyla `int`, `int`, ve `str` tiplerinden oluşan bir `tuple` türündedir .
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  2. docs/pt/docs/python-types.md

    E, ainda assim, o editor sabe que é um `str` e fornece suporte para isso.
    
    #### `Tuple` e `Set`
    
    Você faria o mesmo para declarar `tuple`s e `set`s:
    
    ```Python hl_lines="1 4"
    {!../../../docs_src/python_types/tutorial007.py!}
    ```
    
    Isso significa que:
    
    * A variável `items_t` é uma `tuple` com 3 itens, um `int`, outro `int` e uma `str`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  3. docs/es/docs/python-types.md

    El editor aún sabe que es un `str` y provee soporte para ello.
    
    #### Tuples y Sets
    
    Harías lo mismo para declarar `tuple`s y `set`s:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial007.py!}
    ```
    
    Esto significa:
    
    * La variable `items_t` es un `tuple` con 3 ítems, un `int`, otro `int`, y un `str`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  4. docs/zh/docs/python-types.md

    注意,变量 `item` 是列表 `items` 中的元素之一。
    
    而且,编辑器仍然知道它是一个 `str`,并为此提供了支持。
    
    #### 元组和集合
    
    声明 `tuple` 和 `set` 的方法也是一样的:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial007.py!}
    ```
    
    这表示:
    
    * 变量 `items_t` 是一个 `tuple`,其中的前两个元素都是 `int` 类型, 最后一个元素是 `str` 类型。
    * 变量 `items_s` 是一个 `set`,其中的每个元素都是 `bytes` 类型。
    
    #### 字典
    
    定义 `dict` 时,需要传入两个子类型,用逗号进行分隔。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/body-nested-models.md

    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### Declare a `List` com um parâmetro de tipo
    
    Para declarar tipos que têm parâmetros de tipo(tipos internos), como `list`, `dict`, `tuple`:
    
    * Importe os do modulo `typing`
    * Passe o(s) tipo(s) interno(s) como "parâmetros de tipo" usando colchetes: `[` e `]`
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/body-nested-models.md

    ### typing의 `List` 임포트
    
    먼저, 파이썬 표준 `typing` 모듈에서 `List`를 임포트합니다:
    
    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### 타입 매개변수로 `List` 선언
    
    `list`, `dict`, `tuple`과 같은 타입 매개변수(내부 타입)를 갖는 타입을 선언하려면:
    
    * `typing` 모듈에서 임포트
    * 대괄호를 사용하여 "타입 매개변수"로 내부 타입 전달: `[` 및 `]`
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    이 모든 것은 타입 선언을 위한 표준 파이썬 문법입니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/body-nested-models.md

    ### typingの`List`をインポート
    
    まず、Pythonの標準の`typing`モジュールから`List`をインポートします:
    
    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### タイプパラメータを持つ`List`の宣言
    
    `list`や`dict`、`tuple`のようなタイプパラメータ(内部の型)を持つ型を宣言するには:
    
    * `typing`モジュールからそれらをインストールします。
    * 角括弧(`[`と`]`)を使って「タイプパラメータ」として内部の型を渡します:
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    型宣言の標準的なPythonの構文はこれだけです。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/body-nested-models.md

    ### 从 typing 导入 `List`
    
    首先,从 Python 的标准库 `typing` 模块中导入 `List`:
    
    ```Python hl_lines="1"
    {!> ../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### 声明具有子类型的 List
    
    要声明具有子类型的类型,例如 `list`、`dict`、`tuple`:
    
    * 从 `typing` 模块导入它们
    * 使用方括号 `[` 和 `]` 将子类型作为「类型参数」传入
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    这完全是用于类型声明的标准 Python 语法。
    
    对具有子类型的模型属性也使用相同的标准语法。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. docs/ko/docs/tutorial/response-model.md

    {!../../../docs_src/response_model/tutorial005.py!}
    ```
    
    !!! tip "팁"
        문법 `{"name", "description"}`은 두 값을 갖는 `set`을 만듭니다.
    
        이는 `set(["name", "description"])`과 동일합니다.
    
    #### `set` 대신 `list` 사용하기
    
    `list` 또는 `tuple` 대신 `set`을 사용하는 법을 잊었더라도, FastAPI는 `set`으로 변환하고 정상적으로 작동합니다:
    
    ```Python hl_lines="31  37"
    {!../../../docs_src/response_model/tutorial006.py!}
    ```
    
    ## 요약
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/body-nested-models.md

    ```Python hl_lines="1"
    {!> ../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### Declare a `list` with a type parameter
    
    To declare types that have type parameters (internal types), like `list`, `dict`, `tuple`:
    
    * If you are in a Python version lower than 3.9, import their equivalent version from the `typing` module
    * Pass the internal type(s) as "type parameters" using square brackets: `[` and `]`
    
    In Python 3.9 it would be:
    
    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)
Back to top