(self, instruction)
Adds a ``symbol`` and ``symbol_addr`` fields to the instruction.

        If, after parsing all of the operands, there is exactly one
        value which resolved to a named symbol, it will be set to
        that value.

        In all other cases, the value is ``None``.
Adds a ``symbol`` and ``symbol_addr`` fields to the instruction.
Adds a symbol and symbol_addr fields to the instruction .
def enhance_symbol(self, instruction):
        """
        Adds a ``symbol`` and ``symbol_addr`` fields to the instruction.

        If, after parsing all of the operands, there is exactly one
        value which resolved to a named symbol, it will be set to
        that value.

        In all other cases, the value is ``None``.
        """
        instruction.symbol = None
        operands = [o for o in instruction.operands if o.symbol]

        if len(operands) != 1:
            return

        o = operands[0]

        instruction.symbol = o.symbol
        instruction.symbol_addr = o.int
def enhance_symbol ( self , instruction ) : instruction . symbol = None operands = [ o for o in instruction . operands if o . symbol ] if len ( operands ) != 1 : return o = operands [ 0 ] instruction . symbol = o . symbol instruction . symbol_addr = o . int