Skip to main content

internal.types.bool

Standard library Module View source
class bool
@extend
class bool
Constructors 2
__new__
__new__() -> bool
__new__
@overload
__new__(what, /) -> bool
Special methods 27
__repr__
__repr__(self: Self, /) -> str
__copy__
__copy__(self: Self) -> bool
__deepcopy__
__deepcopy__(self: Self) -> bool
__bool__
__bool__(self: Self, /) -> bool
__hash__
__hash__(self: Self, /) -> int
__add__
@commutative
__add__(self: Self, other: bool, /)
__sub__
__sub__(self: Self, other: bool, /)
__mul__
@commutative
__mul__(self: Self, other: bool, /)
__lshift__
__lshift__(self: Self, other: bool, /)
__rshift__
__rshift__(self: Self, other: bool, /)
__floordiv__
__floordiv__(self: Self, other: bool, /)
__truediv__
__truediv__(self: Self, other: bool, /)
__mod__
__mod__(self: Self, other: bool, /)
__divmod__
__divmod__(self: Self, other: bool, /)
__pow__
__pow__(self: Self, other: bool, /)
__invert__
@pure @llvm
__invert__(self: Self, /) -> bool
%0 = trunc i8 %self to i1
%1 = xor i1 %0, true
%2 = zext i1 %1 to i8
ret i8 %2
__eq__
@pure @llvm
__eq__(self: Self, other: bool, /) -> bool
%0 = icmp eq i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ne__
@pure @llvm
__ne__(self: Self, other: bool, /) -> bool
%0 = icmp ne i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__lt__
@pure @llvm
__lt__(self: Self, other: bool, /) -> bool
%0 = icmp ult i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__gt__
@pure @llvm
__gt__(self: Self, other: bool, /) -> bool
%0 = icmp ugt i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__le__
@pure @llvm
__le__(self: Self, other: bool, /) -> bool
%0 = icmp ule i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__ge__
@pure @llvm
__ge__(self: Self, other: bool, /) -> bool
%0 = icmp uge i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1
__and__
@pure @commutative @associative @llvm
__and__(self: Self, other: bool, /) -> bool
%0 = and i8 %self, %other
ret i8 %0
__or__
@pure @commutative @associative @llvm
__or__(self: Self, other: bool, /) -> bool
%0 = or i8 %self, %other
ret i8 %0
__xor__
@pure @commutative @associative @llvm
__xor__(self: Self, other: bool, /) -> bool
%0 = xor i8 %self, %other
ret i8 %0
__int__
@pure @llvm
__int__(self: Self, /) -> int
%0 = zext i8 %self to i64
ret i64 %0
__float__
@pure @llvm
__float__(self: Self, /) -> float
%0 = uitofp i8 %self to double
ret double %0