def reverse_code_map ( self ) : return { c . value : ( c . ikey if c . ikey else c . key ) for c in self . codes }
one to multiple mapping in python
Return a map from a code ( usually a string ) to the shorter numeric value
def reverse_code_map(self):
        """Return a map from a code ( usually a string ) to the  shorter numeric value"""

        return {c.value: (c.ikey if c.ikey else c.key) for c in self.codes}