stdlibx.option.types module¶ class stdlibx.option.types.Nothing(*args, **kwargs)[source]¶ Bases: Protocol apply(operation)[source]¶ Parameters: operation (Callable[[Some[T] | Nothing], U]) Return type: U is_none()[source]¶ Return type: Literal[True] is_some()[source]¶ Return type: Literal[False] class stdlibx.option.types.Some(*args, **kwargs)[source]¶ Bases: Protocol[T] apply(operation)[source]¶ Parameters: operation (Callable[[Some[T] | Nothing], U]) Return type: U is_none()[source]¶ Return type: Literal[False] is_some()[source]¶ Return type: Literal[True] value: T¶