Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for set2 (0.14 sec)

  1. docs/en/docs/tutorial/body-nested-models.md

        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial002.py!}
        ```
    
    ## Set types
    
    But then we think about it, and realize that tags shouldn't repeat, they would probably be unique strings.
    
    And Python has a special data type for sets of unique items, the `set`.
    
    Then we can declare `tags` as a set of strings:
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    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)
  2. docs/ko/docs/tutorial/body-nested-models.md

    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## 집합 타입
    
    그런데 생각해보니 태그는 반복되면 안 돼고, 고유한(Unique) 문자열이어야 할 것 같습니다.
    
    그리고 파이썬은 집합을 위한 특별한 데이터 타입 `set`이 있습니다.
    
    그렇다면 `Set`을 임포트 하고 `tags`를 `str`의 `set`으로 선언할 수 있습니다:
    
    ```Python hl_lines="1  14"
    {!../../../docs_src/body_nested_models/tutorial003.py!}
    ```
    
    덕분에 중복 데이터가 있는 요청을 수신하더라도 고유한 항목들의 집합으로 변환됩니다.
    
    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)
  3. docs/zh/docs/tutorial/body-nested-models.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial002.py!}
        ```
    
    ## Set 类型
    
    但是随后我们考虑了一下,意识到标签不应该重复,它们很大可能会是唯一的字符串。
    
    Python 具有一种特殊的数据类型来保存一组唯一的元素,即 `set`。
    
    然后我们可以导入 `Set` 并将 `tag` 声明为一个由 `str` 组成的 `set`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial003_py310.py!}
        ```
    
    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)
  4. docs/ja/docs/tutorial/body-nested-models.md

    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## セット型
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    そのため、以下のように、`Set`をインポートして`str`の`set`として`tags`を宣言することができます:
    
    ```Python hl_lines="1 14"
    {!../../../docs_src/body_nested_models/tutorial003.py!}
    ```
    
    これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。
    
    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)
  5. docs/em/docs/tutorial/body-nested-models.md

        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial002_py310.py!}
        ```
    
    ## ⚒ 🆎
    
    ✋️ ⤴️ 👥 💭 🔃 ⚫️, & 🤔 👈 🔖 🚫🔜 🚫 🔁, 👫 🔜 🎲 😍 🎻.
    
    & 🐍 ✔️ 🎁 💽 🆎 ⚒ 😍 🏬, `set`.
    
    ⤴️ 👥 💪 📣 `tags` ⚒ 🎻:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="1  14"
        {!> ../../../docs_src/body_nested_models/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ & 🔛"
    
    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)
Back to top