API Reference / Modules / internal / types / optional internal.types.optional Standard library module View source class Optional @extend class Optional[T] Extends Optional ยท View complete class API โ Constructors 2 __new__ __new__() __new__ @overload __new__(what: T) Special methods 10 __has__ __has__(self) __val__ __val__(self) __val_or__ __val_or__(self, default: T) __bool__ __bool__(self) __eq__ __eq__(self, other: T) @overload __eq__(self, other: Optional[T]) __ne__ __ne__(self, other: T) @overload __ne__(self, other: Optional[T]) __str__ __str__(self) __repr__ __repr__(self) __is_optional__ __is_optional__(self, other: Optional[T]) __unwrap__ __unwrap__(self) function unwrap unwrap(opt, T: type = NoneType)
class Optional @extend class Optional[T] Extends Optional ยท View complete class API โ Constructors 2 __new__ __new__() __new__ @overload __new__(what: T) Special methods 10 __has__ __has__(self) __val__ __val__(self) __val_or__ __val_or__(self, default: T) __bool__ __bool__(self) __eq__ __eq__(self, other: T) @overload __eq__(self, other: Optional[T]) __ne__ __ne__(self, other: T) @overload __ne__(self, other: Optional[T]) __str__ __str__(self) __repr__ __repr__(self) __is_optional__ __is_optional__(self, other: Optional[T]) __unwrap__ __unwrap__(self)