tfchain/TFChainWallet.py
def balance_add(self, other):
        """
        Merge the content of the other balance into this balance.
        If other is None, this call results in a no-op.

        Always assign the result, as it could other than self,
        should the class type be changed in order to add all content correctly.
        """
        if other is None:
            return self
        if not isinstance(other, WalletBalance):
            raise TypeError("other balance has to be of type wallet balance")
        if isinstance(other, MultiSigWalletBalance):
            self._merge_multisig_wallet_balance(other.address, other)
            return self
        # piggy-back on the super class for the actual output merge logic
        b = super().balance_add(other._base)
        if b != self:
            raise Exception("BUG: instance shouldn't have changed, please fix or report")
        if not isinstance(other, WalletsBalance):
            return b # return as nothing else can be merged
        # merge all the multi-signature wallets
        for addr, balance in other._wallets.items():
            b._merge_multisig_wallet_balance(addr, balance)
        # return the merged balance
        return b

        Merge the content of the other balance into this balance.
        If other is None, this call results in a no-op.

        Always assign the result, as it could other than self,
        should the class type be changed in order to add all content correctly.
        
Merge the content of the other balance into this balance.
If other is None, this call results in a no-op.

Always assign the result, as it could other than self,
should the class type be changed in order to add all content correctly.
Merge the content of the other balance into this balance . If other is None this call results in a no - op . Always assign the result as it could other than self should the class type be changed in order to add all content correctly .
def balance_add(self, other):
        if other is None:
            return self
        if not isinstance(other, WalletBalance):
            raise TypeError("other balance has to be of type wallet balance")
        if isinstance(other, MultiSigWalletBalance):
            self._merge_multisig_wallet_balance(other.address, other)
            return self
        b = super().balance_add(other._base)
        if b != self:
            raise Exception("BUG: instance shouldn't have changed, please fix or report")
        if not isinstance(other, WalletsBalance):
            return b 
        for addr, balance in other._wallets.items():
            b._merge_multisig_wallet_balance(addr, balance)
        return b
def balance_add ( self , other ) : if other is None : return self if not isinstance ( other , WalletBalance ) : raise TypeError ( "other balance has to be of type wallet balance" ) if isinstance ( other , MultiSigWalletBalance ) : self . _merge_multisig_wallet_balance ( other . address , other ) return self b = super ( ) . balance_add ( other . _base ) if b != self : raise Exception ( "BUG: instance shouldn't have changed, please fix or report" ) if not isinstance ( other , WalletsBalance ) : return b for addr , balance in other . _wallets . items ( ) : b . _merge_multisig_wallet_balance ( addr , balance ) return b
Merge the content of the other balance into this balance.
Merge the content of the other balance into this balance .
"""
        Merge the content of the other balance into this balance.
        If other is None, this call results in a no-op.

        Always assign the result, as it could other than self,
        should the class type be changed in order to add all content correctly.
        """ # piggy-back on the super class for the actual output merge logic # return as nothing else can be merged # merge all the multi-signature wallets # return the merged balance
self
other