preheat_open.helpers.convenience_result_list_shortener¶
- preheat_open.helpers.convenience_result_list_shortener(result)¶
Method used for convenience helpers to querying methods returning lists
- Parameters:
result (
list
[Any
]) – input list- Return type:
Union
[list
[Any
],Any
,None
]- Returns:
Depends on the input list length: None if list is empty, unique list element if list has length one (i.e. returns X if input is [X], or input value if the list has length > 1