- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 132 for unionOf (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
internal/event/rules.go
targetIDs = targetIDs.Union(targetIDSet) } } return targetIDs } // Clone - returns copy of this rules. func (rules Rules) Clone() Rules { rulesCopy := make(Rules) for pattern, targetIDSet := range rules { rulesCopy[pattern] = targetIDSet.Clone() } return rulesCopy } // Union - returns union with given rules as new rules.
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri May 24 23:05:23 GMT 2024 - 2.7K bytes - Click Count (0) -
docs/ko/docs/tutorial/response-model.md
또한, 유효한 Pydantic 타입이 아닌 타입이 하나 이상 포함된 여러 타입 간의 <dfn title="여러 타입 간의 union은 '이 타입들 중 아무거나'를 의미합니다.">union</dfn>이 있는 경우에도 동일합니다. 예를 들어, 아래는 실패합니다 💥: {* ../../docs_src/response_model/tutorial003_04_py310.py hl[8] *} ...이는 타입 어노테이션이 Pydantic 타입이 아니고, 단일 `Response` 클래스/서브클래스도 아니며, `Response`와 `dict` 간 union(둘 중 아무거나)이기 때문에 실패합니다. ### 응답 모델 비활성화 { #disable-response-model }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 17.9K bytes - Click Count (0) -
src/main/java/jcifs/dcerpc/msrpc/srvsvc.idl
typedef struct { int count; [size_is(count)] ShareInfo502 *array; } ShareInfoCtr502; typedef [switch_type(int)] union { [case(0)] ShareInfo0 *info0; [case(1)] ShareInfo1 *info1; [case(502)] ShareInfo502 *info1; } ShareInfo; typedef [switch_type(int)] union { [case(0)] ShareInfoCtr0 *info0; [case(1)] ShareInfoCtr1 *info1; [case(502)] ShareInfoCtr502 *info1; } ShareCtr; [op(0x0f)]Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Jul 01 13:12:10 GMT 2018 - 2.2K bytes - Click Count (0) -
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) -
docs/ko/docs/advanced/advanced-python-types.md
Python 타입을 다룰 때 유용할 수 있는 몇 가지 추가 아이디어를 소개합니다. ## `Union` 또는 `Optional` 사용 { #using-union-or-optional } 어떤 이유로 코드에서 `|`를 사용할 수 없다면, 예를 들어 타입 어노테이션이 아니라 `response_model=` 같은 곳이라면, 파이프 문자(`|`) 대신 `typing`의 `Union`을 사용할 수 있습니다. 예를 들어, 어떤 값이 `str` 또는 `None`이 될 수 있다고 선언할 수 있습니다: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 2.4K bytes - Click Count (0) -
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) -
internal/config/lambda/event/targetidset.go
maps.Copy(setCopy, set) return setCopy } // add - adds TargetID to the set. func (set TargetIDSet) add(targetID TargetID) { set[targetID] = struct{}{} } // Union - returns union with given set as new set. func (set TargetIDSet) Union(sset TargetIDSet) TargetIDSet { nset := set.Clone() for k := range sset { nset.add(k) } return nset }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 1.9K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/advanced-python-types.md
# 進階 Python 型別 { #advanced-python-types } 以下是一些在使用 Python 型別時可能有用的額外想法。 ## 使用 `Union` 或 `Optional` { #using-union-or-optional } 如果你的程式碼因某些原因無法使用 `|`,例如不是在型別註記中,而是在像 `response_model=` 之類的參數位置,那麼你可以用 `typing` 中的 `Union` 來取代豎線(`|`)。 例如,你可以宣告某個值可以是 `str` 或 `None`: ```python from typing import Union def say_hi(name: Union[str, None]): print(f"Hi {name}!") ``` 在 `typing` 中也有用 `Optional` 宣告某個值可以是 `None` 的速記法。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 1.9K bytes - Click Count (0) -
tests/test_compat.py
def test_serialize_sequence_value_with_none_first_in_union(): """Test that serialize_sequence_value handles Union[None, List[...]] correctly.""" from typing import Union from fastapi._compat import v2 # Use Union[None, list[str]] to ensure None comes first in the union args field_info = FieldInfo(annotation=Union[None, list[str]]) # noqa: UP007 field = v2.ModelField(name="items", field_info=field_info)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 4.2K bytes - Click Count (0) -
internal/event/targetidset.go
maps.Copy(setCopy, set) return setCopy } // add - adds TargetID to the set. func (set TargetIDSet) add(targetID TargetID) { set[targetID] = struct{}{} } // Union - returns union with given set as new set. func (set TargetIDSet) Union(sset TargetIDSet) TargetIDSet { nset := set.Clone() for k := range sset { nset.add(k) } return nset }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 1.8K bytes - Click Count (0)