Convert a many-to-one mapping to a one-to-one mapping
(input_dict)
| 38 | |
| 39 | |
| 40 | def _many_to_one(input_dict): |
| 41 | """Convert a many-to-one mapping to a one-to-one mapping""" |
| 42 | return dict((key, val) for keys, val in input_dict.items() for key in keys) |
| 43 | |
| 44 | |
| 45 | LINESTYLES = _many_to_one( |