Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 980 for tutorial007_py310 (0.13 seconds)

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

    마찬가지로 예제에서 `tags`를 구체적으로 "문자열의 리스트"로 만들 수 있습니다:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## 집합 타입 { #set-types }
    
    그런데 생각해보니 태그는 반복되면 안 되고, 아마 고유한 문자열이어야 할 것입니다.
    
    그리고 파이썬에는 고유한 항목들의 집합을 위한 특별한 데이터 타입 `set`이 있습니다.
    
    그렇다면 `tags`를 문자열의 집합으로 선언할 수 있습니다:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    이렇게 하면 중복 데이터가 있는 요청을 받더라도 고유한 항목들의 집합으로 변환됩니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.7K bytes
    - Click Count (0)
  2. docs/en/docs/advanced/custom-response.md

    {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
    
    ### `HTMLResponse` { #htmlresponse }
    
    Takes some text or bytes and returns an HTML response, as you read above.
    
    ### `PlainTextResponse` { #plaintextresponse }
    
    Takes some text or bytes and returns a plain text response.
    
    {* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *}
    
    ### `JSONResponse` { #jsonresponse }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  3. docs/en/docs/python-types.md

    {* ../../docs_src/python_types/tutorial003_py310.py hl[1] *}
    
    Because the editor knows the types of the variables, you don't only get completion, you also get error checks:
    
    <img src="/img/python-types/image04.png">
    
    Now you know that you have to fix it, convert `age` to a string with `str(age)`:
    
    {* ../../docs_src/python_types/tutorial004_py310.py hl[2] *}
    
    ## Declaring types { #declaring-types }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/body-nested-models.md

    对具有内部类型的模型属性也使用相同的标准语法。
    
    因此,在我们的示例中,我们可以将 `tags` 明确地指定为一个「字符串列表」:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## Set 类型 { #set-types }
    
    但是随后我们考虑了一下,意识到标签不应该重复,它们很大可能会是唯一的字符串。
    
    而 Python 有一种用于保存唯一元素集合的特殊数据类型 `set`。
    
    然后我们可以将 `tags` 声明为一个由字符串组成的 set:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    这样,即使你收到带有重复数据的请求,这些数据也会被转换为一组唯一项。
    
    而且,每当你输出该数据时,即使源数据有重复,它们也将作为一组唯一项输出。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  5. docs/ja/docs/tutorial/body-nested-models.md

    そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## セット型 { #set-types }
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    そして、`tags`を文字列のセットとして宣言できます:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/python-types.md

    你也可以用相同方式來宣告 `tuple` 與 `set`:
    
    {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *}
    
    這代表:
    
    * 變數 `items_t` 是一個有 3 個項目的 `tuple`,分別是 `int`、`int` 和 `str`。
    * 變數 `items_s` 是一個 `set`,而其中每個項目都是 `bytes` 型別。
    
    #### Dict { #dict }
    
    定義 `dict` 時,你需要傳入 2 個以逗號分隔的型別參數。
    
    第一個型別參數是 `dict` 的鍵(key)。
    
    第二個型別參數是 `dict` 的值(value):
    
    {* ../../docs_src/python_types/tutorial008_py310.py hl[1] *}
    
    這代表:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.7K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/advanced/custom-response.md

    {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
    
    ### `HTMLResponse` { #htmlresponse }
    
    接收文字或位元組並回傳 HTML 回應,如上所述。
    
    ### `PlainTextResponse` { #plaintextresponse }
    
    接收文字或位元組並回傳純文字回應。
    
    {* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *}
    
    ### `JSONResponse` { #jsonresponse }
    
    接收資料並回傳 `application/json` 編碼的回應。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  8. docs/zh/docs/python-types.md

    声明 `tuple` 和 `set` 的方式类似:
    
    {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *}
    
    这表示:
    
    * 变量 `items_t` 是一个含有 3 个元素的 `tuple`,分别是一个 `int`、另一个 `int`,以及一个 `str`。
    * 变量 `items_s` 是一个 `set`,其中每个元素的类型是 `bytes`。
    
    #### 字典 { #dict }
    
    定义 `dict` 时,需要传入 2 个类型参数,用逗号分隔。
    
    第一个类型参数用于字典的键。
    
    第二个类型参数用于字典的值:
    
    {* ../../docs_src/python_types/tutorial008_py310.py hl[1] *}
    
    这表示:
    
    * 变量 `prices` 是一个 `dict`:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 10.6K bytes
    - Click Count (0)
  9. docs/ja/docs/python-types.md

    {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *}
    
    つまり:
    
    * 変数 `items_t` は `int`、別の `int`、`str` の 3 つの項目を持つ `tuple` です。
    * 変数 `items_s` は `set` であり、その各項目は `bytes` 型です。
    
    #### Dict { #dict }
    
    `dict` を定義するには、カンマ区切りで 2 つの型パラメータを渡します。
    
    最初の型パラメータは `dict` のキーです。
    
    2 番目の型パラメータは `dict` の値です:
    
    {* ../../docs_src/python_types/tutorial008_py310.py hl[1] *}
    
    つまり:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  10. docs/uk/docs/advanced/path-operation-advanced-configuration.md

    {* ../../docs_src/path_operation_advanced_configuration/tutorial007_py310.py hl[15:20, 22] *}
    
    Попри те, що ми не використовуємо типову вбудовану функціональність, ми все одно використовуємо модель Pydantic, щоб вручну згенерувати Схему JSON для даних, які хочемо отримати у форматі YAML.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 10.3K bytes
    - Click Count (0)
Back to Top