• Robert Bradshaw's avatar
    Added a bint c type, which is a c int that coerces to and from python objects... · eb232ced
    Robert Bradshaw authored
    Added a bint c type, which is a c int that coerces to and from python objects via the boolean routines.
    
    The purpose of this type is to free the coder from having to use
    bool() when retrieving and returning semantically "boolean" values
    (e.g. the result of a compare).
    
    The bint type is a subclass of the int type, and the only difference
    is that it uses PyBool_FromLong and PyObject_IsTrue rather than
    PyInt_FromLong and PyInt_AsLong. Arithmatic on bints will return ints.
    
    Where it makes sense, several builtin functions have been re-declared
    to return bints, as well as comparisons and the boolean operations
    or, and, and not.
    eb232ced
Parsing.py 56.9 KB