A Python class is generated for an ASN.1 BOOLEAN type only if the type is tagged. This is only true for BER/DER encoding rules; in other cases, no class is generated.
If a class is generated, it will contain static methods for the BER encoding or decoding of a boolean value.
Example ASN.1:
B ::= [APPLICATION 2] BOOLEAN
Generated Python Class:
class B:
@staticmethod
def ber_decode(decbuf, explicit=True, impllen=None):
...
@staticmethod
def ber_encode(value, encbuf, explicit=True):
...
The value that is returned by the decode method or passed into the encode method is a Python boolean value (True or False).
See the BER encode/decode methods for information on how to call these methods.