def get_representation(value): representation = '' if value is None: representation = 'nil' elif isinstance(value, bool): representation = _get_boolean_representation(value) elif type_utilities.is_list(value): representation = _get_list_representation(value) elif type_utilities.is_pack(value): representation = _get_pack_representation(value) elif type_utilities.is_closure(value): representation = _get_closure_representation(value) else: representation = str(value) return representation