etcd3ref/client.py
def replace(self, key, initial_value, new_value):
        """
        Atomically replace the value of a key with a new value.

        This compares the current value of a key, then replaces it with a new
        value if it is equal to a specified value. This operation takes place
        in a transaction.

        :param key: key in etcd to replace
        :param initial_value: old value to replace
        :type initial_value: bytes
        :param new_value: new value of the key
        :type new_value: bytes
        :returns: status of transaction, ``True`` if the replace was
                  successful, ``False`` otherwise
        :rtype: bool
        """
        try:
            return self.__replace(initial_value, key, new_value)
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            return self.__replace(initial_value, key, new_value)

        Atomically replace the value of a key with a new value.

        This compares the current value of a key, then replaces it with a new
        value if it is equal to a specified value. This operation takes place
        in a transaction.

        :param key: key in etcd to replace
        :param initial_value: old value to replace
        :type initial_value: bytes
        :param new_value: new value of the key
        :type new_value: bytes
        :returns: status of transaction, ``True`` if the replace was
                  successful, ``False`` otherwise
        :rtype: bool
        
Atomically replace the value of a key with a new value.
This compares the current value of a key, then replaces it with a new
value if it is equal to a specified value. This operation takes place
in a transaction.
Atomically replace the value of a key with a new value . This compares the current value of a key then replaces it with a new value if it is equal to a specified value . This operation takes place in a transaction .
def replace(self, key, initial_value, new_value):
        try:
            return self.__replace(initial_value, key, new_value)
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            return self.__replace(initial_value, key, new_value)
def replace ( self , key , initial_value , new_value ) : try : return self . __replace ( initial_value , key , new_value ) except _InactiveRpcError as e : print ( "Exception {} happened, try to reconnect \n" . format ( e ) ) self . reconnect ( ) return self . __replace ( initial_value , key , new_value )
Atomically replace the value of a key with a new value.
Atomically replace the value of a key with a new value .
"""
        Atomically replace the value of a key with a new value.

        This compares the current value of a key, then replaces it with a new
        value if it is equal to a specified value. This operation takes place
        in a transaction.

        :param key: key in etcd to replace
        :param initial_value: old value to replace
        :type initial_value: bytes
        :param new_value: new value of the key
        :type new_value: bytes
        :returns: status of transaction, ``True`` if the replace was
                  successful, ``False`` otherwise
        :rtype: bool
        """
status of transaction, ``True`` if the replace was
successful, ``False`` otherwise
status of transaction ` ` True ` ` if the replace was successful ` ` False ` ` otherwise
bool
self
key
key in etcd to replace
key in etcd to replace
initial_value
old value to replace
old value to replace
new_value
new value of the key
new value of the key