def send_data_to_socket(self):
        if not self.connected:
            self.throw_exception(message='disconnected')

        if not self._outgoing_buffer:
            return 0

        while True:
            try:
                bytes_sent = self.gearman_socket.send(self._outgoing_buffer)
            except ssl.SSLError as e:
                if e.errno == ssl.SSL_ERROR_WANT_READ:
                    continue
                elif e.errno == ssl.SSL_ERROR_WANT_WRITE:
                    continue
                else:
                    self.throw_exception(exception=e)
            except socket.error, socket_exception:
                self.throw_exception(exception=socket_exception)

            if bytes_sent == 0:
                self.throw_exception(message='remote disconnected')
            break

        self._outgoing_buffer = self._outgoing_buffer[bytes_sent:]
        return len(self._outgoing_buffer)
Like __div__ but also assigns to the variable.
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/connection.py/GearmanConnection.send_data_to_socket--crossover with--dataset/ETHPy150Open pypa/pip/tests/lib/path.py/Path.__idiv__