UniCoreFW

is_map()

Check if obj is a map (dictionary in Python).

Implementation

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

Example

is_map({'a': 1, 'b': 2})

Expected output: True

Source Code

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