Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 71 - 80 of 158 for union_ (0.05 seconds)

  1. docs/zh-hant/docs/python-types.md

    這代表:
    
    * 變數 `prices` 是個 `dict`:
        * 這個 `dict` 的鍵是 `str`(例如每個項目的名稱)。
        * 這個 `dict` 的值是 `float`(例如每個項目的價格)。
    
    #### Union { #union }
    
    你可以宣告一個變數可以是「多種型別」中的任一種,例如 `int` 或 `str`。
    
    要這麼定義,你使用<dfn title='也稱為「位元或運算子」,但在這裡與該含義無關'>豎線(`|`)</dfn>來分隔兩種型別。
    
    這稱為「union」,因為變數可以是這兩種型別集合的聯集中的任一種。
    
    ```Python hl_lines="1"
    {!> ../../docs_src/python_types/tutorial008b_py310.py!}
    ```
    
    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)
  2. docs/ko/docs/python-types.md

        * 이 `dict`의 키는 `str` 타입입니다(예: 각 아이템의 이름).
        * 이 `dict`의 값은 `float` 타입입니다(예: 각 아이템의 가격).
    
    #### Union { #union }
    
    변수가 **여러 타입 중 어떤 것이든** 될 수 있다고 선언할 수 있습니다. 예를 들어 `int` 또는 `str`입니다.
    
    이를 정의하려면 두 타입을 <dfn title='“비트 단위 OR 연산자”라고도 하지만, 여기서는 그 의미와 관련이 없습니다'>세로 막대(`|`)</dfn>로 구분해 사용합니다.
    
    이는 두 타입 집합의 합집합(union) 안의 어느 것이든 될 수 있다는 뜻이므로 "유니온"이라고 부릅니다.
    
    ```Python hl_lines="1"
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 13K bytes
    - Click Count (0)
  3. internal/event/targetidset_test.go

    		{NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"})},
    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Union(testCase.setToAdd)
    
    		if !reflect.DeepEqual(testCase.expectedResult, result) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.9K bytes
    - Click Count (0)
  4. tests/test_additional_responses_union_duplicate_anyof.py

    """
    Regression test: Ensure app-level responses with Union models and content/examples
    don't accumulate duplicate $ref entries in anyOf arrays.
    See https://github.com/fastapi/fastapi/pull/14463
    """
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    from pydantic import BaseModel
    
    
    class ModelA(BaseModel):
        a: str
    
    
    class ModelB(BaseModel):
        b: str
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 4.3K bytes
    - Click Count (0)
  5. fastapi/param_functions.py

            ),
        ] = None,
        discriminator: Annotated[
            str | None,
            Doc(
                """
                Parameter field name for discriminating the type in a tagged union.
                """
            ),
        ] = None,
        strict: Annotated[
            bool | None,
            Doc(
                """
                If `True`, strict validation is applied to the field.
                """
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 68K bytes
    - Click Count (0)
  6. src/main/java/jcifs/dcerpc/msrpc/srvsvc.java

            }
    
            @Override
            public void decode_out(NdrBuffer _src) throws NdrException {
                this.level = _src.dec_ndr_long();
                _src.dec_ndr_long(); /* union discriminant */
                final int _infop = _src.dec_ndr_long();
                if (_infop != 0) {
                    if (this.info == null) { /* YOYOYO */
                        this.info = new ShareInfoCtr0();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 27K bytes
    - Click Count (0)
  7. misc/cgo/gmp/gmp.go

    a Go translation.  C arithmetic types translate to precisely-sized Go
    arithmetic types.  A C struct translates to a Go struct, field by
    field; unrepresentable fields are replaced with opaque byte arrays.  A
    C union translates into a struct containing the first union member and
    perhaps additional padding.  C arrays become Go arrays.  C pointers
    become Go pointers.  C function pointers become Go's uintptr.
    C void pointers become Go's unsafe.Pointer.
    
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Click Count (0)
  8. docs/uk/docs/tutorial/response-model.md

    {* ../../docs_src/response_model/tutorial003_04_py310.py hl[8] *}
    
    ...це не працює, тому що анотація типу не є типом Pydantic і не є просто одним класом `Response` або його підкласом, це union (будь-який із двох) між `Response` і `dict`.
    
    ### Вимкнути модель відповіді { #disable-response-model }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 25.2K bytes
    - Click Count (0)
  9. docs/ru/docs/tutorial/response-model.md

    {* ../../docs_src/response_model/tutorial003_04_py310.py hl[8] *}
    
    ...это не сработает, потому что аннотация типа не является типом Pydantic и это не единственный класс `Response` или его подкласс, а объединение (`union`) из `Response` и `dict`.
    
    ### Отключить модель ответа { #disable-response-model }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 25.5K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/collect/Multisets.java

          return ((Multiset<?>) elements).elementSet().size();
        }
        return 11; // initial capacity will be rounded up to 16
      }
    
      /**
       * Returns an unmodifiable view of the union of two multisets. In the returned multiset, the count
       * of each element is the <i>maximum</i> of its counts in the two backing multisets. The iteration
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 18:35:44 GMT 2025
    - 41.3K bytes
    - Click Count (0)
Back to Top