Note that the boundary value need not be of the same type that was annotated, so long as they can be compared: Annotated[int, Gt(1.5)] is fine, for example, and implies that the value is an integer x such that x > 1.5.We suggest that implementors may also interpret functools.partial...
gt: SupportsGt | None = None ge: SupportsGe | None = None lt: SupportsLt | None = None le: SupportsLe | None = None gt: Union[SupportsGt, None] = None ge: Union[SupportsGe, None] = None lt: Union[SupportsLt, None] = None ...
def __iter__(self) -> Iterator[BaseMetadata]: """Unpack an Interval into zero or more single-bounds, as per PEP-646.""" """Unpack an Interval into zero or more single-bounds.""" if self.gt is not None: yield Gt(self.gt) if self.ge is not None:13...
dates, times, strings, sets, etc. Note that the boundary value need not be of the same type that was annotated, so long as they can be compared:Annotated[int, Gt(1.5)]is fine, for example, and implies that the value is an integer x such thatx > 1.5. ...