UniCoreFW

is_boolean()

Check if obj is a boolean.

Implementation

Args: obj: The object to check Returns: True if obj is a boolean, False otherwise

Example

is_boolean(True)

Expected output: True

Source Code

def is_boolean(obj: Any) -> bool: return isinstance(obj, bool)