pythonic-fp-booleans

Project pythonic-fp-booleans one of the PyPI Pythonic FP projects.

PyPI 3.0.0 release

Subtypable Boolean Class Hierarchy

digraph Booleans {
    bgcolor="#957fb8";
    node [style=filled, fillcolor="#181616", fontcolor="#dcd7ba"];
    edge [color="#181616", fontcolor="#dcd7ba"];
    int -> bool;
    int -> SBool;
    SBool -> "FBool(h1)";
    SBool -> "FBool(h2)";
    SBool -> "FBool(h3)";
    SBool -> TF_Bool;
    TF_Bool -> T_Bool;
    TF_Bool -> F_Bool;
}

While still compatible with Python shortcut logic, SBool and its subclasses can be non-shortcut logically composed with Python’s bitwise operators.