module flavored¶
Class F_Bool.
When different flavors of the truth matter. Each FBool is
an SBool subtype corresponds to a hashable value
called its flavor.
Warning
Combining FBool instances of different flavors
with bitwise operators will just result in an SBool.
Function truthy(flavor: Hashable)
Returns the truthy FBool of a particular flavor.
Function falsy(flavor: Hashable)
Returns the falsy FBool of a particular flavor.
- final class pythonic_fp.booleans.flavored.FBool(witness: object, flavor: Hashable)¶
- Parameters:
witness – Determines truthiness of the
FBoolinstance returned.flavor – The
flavorofFBoolto created.
- Returns:
The truthy or falsy
FBoolinstance of a particularflavor.
- static __new__(cls, witness: object, flavor: Hashable) FBool¶
- Parameters:
witness – Determines truthiness of the
FBoolinstance returned.flavor – The
flavorofFBoolto created.
- Returns:
The truthy or falsy
FBoolinstance of a particularflavor.
- __init__(witness: object, flavor: Hashable) None¶
- __repr__() str¶
Return repr(self).
- flavor() Hashable¶
- Returns:
The flavor of the FBool.