Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Tags (0.2 sec)

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

        ```
    
    ## Set-Typen
    
    Aber dann denken wir darüber nach und stellen fest, dass sich die Tags nicht wiederholen sollen, es sollen eindeutige Strings sein.
    
    Python hat einen Datentyp speziell für Mengen eindeutiger Dinge: das <abbr title="Menge">`set`</abbr>.
    
    Deklarieren wir also `tags` als Set von Strings.
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/body-nested-models.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial001.py!}
        ```
    
    Это приведёт к тому, что обьект `tags` преобразуется в список, несмотря на то что тип его элементов не объявлен.
    
    ## Определение полей содержащих список с определением типов его элементов
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/body-nested-models.md

    Portanto, em nosso exemplo, podemos fazer com que `tags` sejam especificamente uma "lista de strings":
    
    
    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## Tipo "set"
    
    
    Mas então, quando nós pensamos mais, percebemos que as tags não devem se repetir, elas provavelmente devem ser strings únicas.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/body-nested-models.md

    내부 타입을 갖는 모델 어트리뷰트에 대해 동일한 표준 문법을 사용하세요.
    
    마찬가지로 예제에서 `tags`를 구체적으로 "문자열의 리스트"로 만들 수 있습니다:
    
    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## 집합 타입
    
    그런데 생각해보니 태그는 반복되면 안 돼고, 고유한(Unique) 문자열이어야 할 것 같습니다.
    
    그리고 파이썬은 집합을 위한 특별한 데이터 타입 `set`이 있습니다.
    
    그렇다면 `Set`을 임포트 하고 `tags`를 `str`의 `set`으로 선언할 수 있습니다:
    
    ```Python hl_lines="1  14"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/body-nested-models.md

        {!> ../../../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"
        {!> ../../../docs_src/body_nested_models/tutorial003_py310.py!}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/body-nested-models.md

    型宣言の標準的なPythonの構文はこれだけです。
    
    内部の型を持つモデルの属性にも同じ標準の構文を使用してください。
    
    そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます:
    
    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ## セット型
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    そのため、以下のように、`Set`をインポートして`str`の`set`として`tags`を宣言することができます:
    
    ```Python hl_lines="1 14"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/body-nested-models.md

        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ &amp; 🔛"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
        ```
    
    👉 🔜 ⚒ `tags` 📇, 👐 ⚫️ 🚫 📣 🆎 🔣 📇.
    
    ## 📇 🏑 ⏮️ 🆎 🔢
    
    ✋️ 🐍 ✔️ 🎯 🌌 📣 📇 ⏮️ 🔗 🆎, ⚖️ "🆎 🔢":
    
    ### 🗄 ⌨ `List`
    
    🐍 3️⃣.9️⃣ &amp; 🔛 👆 💪 ⚙️ 🐩 `list` 📣 👫 🆎 ✍ 👥 🔜 👀 🔛. 👶
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/body-nested-models.md

        {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/body_nested_models/tutorial001.py!}
        ```
    
    这将使 `tags` 成为一个由元素组成的列表。不过它没有声明每个元素的类型。
    
    ## 具有子类型的 List 字段
    
    但是 Python 有一种特定的方法来声明具有子类型的列表:
    
    ### 从 typing 导入 `List`
    
    首先,从 Python 的标准库 `typing` 模块中导入 `List`:
    
    ```Python hl_lines="1"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top