Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 913 for tutorial009_py310 (0.08 seconds)

  1. docs_src/body_nested_models/tutorial009_py310.py

    Sebastián Ramírez <******@****.***> 1770902383 -0800
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 154 bytes
    - Click Count (0)
  2. docs_src/custom_response/tutorial009_py310.py

    Sebastián Ramírez <******@****.***> 1770902383 -0800
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 202 bytes
    - Click Count (0)
  3. docs/zh-hant/docs/tutorial/body-nested-models.md

    對於具有內部型別的模型屬性,也使用相同的標準語法。
    
    因此,在我們的範例中,可以讓 `tags` 明確成為「字串的列表」:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## 集合型別 { #set-types }
    
    但進一步思考後,我們會意識到 `tags` 不應該重覆,應該是唯一的字串。
    
    而 Python 有一種用於唯一元素集合的特殊資料型別:`set`。
    
    因此我們可以將 `tags` 宣告為字串的 `set`:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    這樣一來,即使收到包含重覆資料的請求,也會被轉換為由唯一元素組成的 `set`。
    
    之後只要輸出該資料,即使來源有重覆,也會以唯一元素的 `set` 輸出。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/body-nested-models.md

    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## Set types { #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:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  5. 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)
  6. docs/en/docs/advanced/custom-response.md

    File responses will include appropriate `Content-Length`, `Last-Modified` and `ETag` headers.
    
    {* ../../docs_src/custom_response/tutorial009_py310.py hl[2,10] *}
    
    You can also use the `response_class` parameter:
    
    {* ../../docs_src/custom_response/tutorial009b_py310.py hl[2,8,10] *}
    
    In this case, you can return the file path directly from your *path operation* function.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  7. pyproject.toml

    "docs_src/custom_request_and_route/tutorial002_py310.py" = ["B904"]
    "docs_src/custom_request_and_route/tutorial002_py39.py" = ["B904"]
    "docs_src/custom_response/tutorial007_py310.py" = ["B007"]
    "docs_src/custom_response/tutorial007_py39.py" = ["B007"]
    "docs_src/dataclasses/tutorial003_py39.py" = ["I001"]
    "docs_src/dependencies/tutorial007_py310.py" = ["F821"]
    "docs_src/dependencies/tutorial007_py39.py" = ["F821"]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 12:36:49 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  8. 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)
  9. 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)
  10. docs/zh-hant/docs/python-types.md

    ///
    
    ## 動機 { #motivation }
    
    先從一個簡單的例子開始:
    
    {* ../../docs_src/python_types/tutorial001_py310.py *}
    
    執行這個程式會輸出:
    
    ```
    John Doe
    ```
    
    這個函式會做以下事情:
    
    * 接收 `first_name` 與 `last_name`。
    * 用 `title()` 把每個字的第一個字母轉成大寫。
    * 用一個空白把它們<dfn title="把它們合在一起,成為一個。將其中一個的內容接在另一個後面。">串接</dfn>起來。
    
    {* ../../docs_src/python_types/tutorial001_py310.py hl[2] *}
    
    ### 編輯它 { #edit-it }
    
    這是一個非常簡單的程式。
    
    但現在想像你正從零開始寫它。
    
    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)
Back to Top