I'm having concerns about readability of this piece of code:messages_dict = {'error':errors, 'warning':warnings}[severity]messages_dict[field_key] = messageand I'm to use this instead:if severity == 'error':    messages_dict = errorselif sevierty == 'warning':    messages_dict = warningselse:    raise ValueError('Incorrect severity value')messages_dict[field_key] = messageBut it looks too verbose for such a simple thing.I don't care too much if it's more efficient than constructing a dictionary for just two mappings.  Readability and maintainability is my biggest concern here (errors and warnings are method arguments, so I cannot build the lookup dictionary beforehand and reuse it later).
Readability concerns with literal dictionary lookup vs if-else
python;hash table;lookup