Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 157 for Union (0.02 seconds)

  1. docs/zh/docs/tutorial/extra-models.md

    {* ../../docs_src/extra_models/tutorial002_py310.py hl[7,13:14,17:18,21:22] *}
    
    ## `Union` 或 `anyOf` { #union-or-anyof }
    
    响应可以声明为两个或多个类型的 `Union`,即该响应可以是这些类型中的任意一种。
    
    在 OpenAPI 中会用 `anyOf` 表示。
    
    为此,请使用 Python 标准类型提示 [`typing.Union`](https://docs.python.org/3/library/typing.html#typing.Union):
    
    /// note | 注意
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  2. src/cmd/cgo/doc.go

    files. The C code must not modify the contents of the pointer returned
    by _GoStringPtr. Note that the string contents may not have a trailing
    NUL byte.
    
    As Go doesn't have support for C's union type in the general case,
    C's union types are represented as a Go byte array with the same length.
    
    Go structs cannot embed fields with C types.
    
    Go code cannot refer to zero-sized fields that occur at the end of
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Mon Dec 08 22:37:14 GMT 2025
    - 43.9K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/collect/TreeRangeSet.java

        TreeRangeSet<C> result = create();
        result.addAll(rangeSet);
        return result;
      }
    
      /**
       * Returns a {@code TreeRangeSet} representing the union of the specified ranges.
       *
       * <p>This is the smallest {@code RangeSet} which encloses each of the specified ranges. An
       * element will be contained in this {@code RangeSet} if and only if it is contained in at least
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 32.3K bytes
    - Click Count (0)
  4. docs/ru/docs/advanced/advanced-python-types.md

    ## Использование `Union` или `Optional` { #using-union-or-optional }
    
    Если по какой-то причине ваш код не может использовать `|`, например, если это не аннотация типов, а что-то вроде `response_model=`, вместо вертикальной черты (`|`) можно использовать `Union` из `typing`.
    
    Например, вы можете объявить, что значение может быть `str` или `None`:
    
    ```python
    from typing import Union
    
    
    def say_hi(name: Union[str, None]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 19:57:34 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  5. docs/uk/docs/tutorial/extra-models.md

    ## `Union` або `anyOf` { #union-or-anyof }
    
    Ви можете оголосити відповідь як `Union` двох або більше типів - це означає, що відповідь може бути будь-якого з них.
    
    В OpenAPI це буде визначено як `anyOf`.
    
    Для цього використайте стандартну підказку типу Python [`typing.Union`](https://docs.python.org/3/library/typing.html#typing.Union):
    
    /// note | Примітка
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  6. docs/uk/docs/advanced/advanced-python-types.md

    ## Використання `Union` або `Optional` { #using-union-or-optional }
    
    Якщо ваш код з якоїсь причини не може використовувати `|`, наприклад, якщо це не анотація типів, а щось на кшталт `response_model=`, замість вертикальної риски (`|`) ви можете використати `Union` з `typing`.
    
    Наприклад, ви можете оголосити, що щось може бути `str` або `None`:
    
    ```python
    from typing import Union
    
    
    def say_hi(name: Union[str, None]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:43:14 GMT 2026
    - 3.1K bytes
    - Click Count (0)
  7. docs/es/docs/advanced/advanced-python-types.md

    ## Usar `Union` u `Optional` { #using-union-or-optional }
    
    Si por alguna razón tu código no puede usar `|`, por ejemplo si no está en una anotación de tipos sino en algo como `response_model=`, en lugar de usar la barra vertical (`|`) puedes usar `Union` de `typing`.
    
    Por ejemplo, podrías declarar que algo podría ser un `str` o `None`:
    
    ```python
    from typing import Union
    
    
    def say_hi(name: Union[str, None]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:41:41 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  8. src/test/java/jcifs/dcerpc/msrpc/lsarpcTest.java

            when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 123); // _infop, retval
            when(mockNdrBuffer.dec_ndr_short()).thenReturn((int) (short) 0); // union discriminant
    
            queryInfoPolicy.decode_out(mockNdrBuffer);
    
            verify(mockInfo).decode(mockNdrBuffer);
            assertEquals(123, queryInfoPolicy.retval);
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 60.8K bytes
    - Click Count (0)
  9. docs/tr/docs/tutorial/extra-models.md

    ## `Union` veya `anyOf` { #union-or-anyof }
    
    Bir response'u iki ya da daha fazla type'ın `Union`'ı olarak tanımlayabilirsiniz; bu, response'un bunlardan herhangi biri olabileceği anlamına gelir.
    
    OpenAPI'de bu `anyOf` ile tanımlanır.
    
    Bunu yapmak için standart Python type hint'i olan [`typing.Union`](https://docs.python.org/3/library/typing.html#typing.Union)'ı kullanın:
    
    /// note | Not
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 7.4K bytes
    - Click Count (0)
  10. docs/de/docs/tutorial/extra-models.md

    {* ../../docs_src/extra_models/tutorial002_py310.py hl[7,13:14,17:18,21:22] *}
    
    ## `Union` oder `anyOf` { #union-or-anyof }
    
    Sie können deklarieren, dass eine <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> eine <abbr title="Union – Verbund, Einheit, Vereinigung: Eines von Mehreren">`Union`</abbr> mehrerer Typen ist, das bedeutet, dass die Response einer von ihnen ist.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 7.7K bytes
    - Click Count (0)
Back to Top