(self)
return error
Return a dictionary representation of this object for
        serialization in a JSON-RPC response.
Return a dictionary representation of this object for
        serialization in a JSON-RPC response.
Return a dictionary representation of this object for serialization in a JSON - RPC response .
def as_dict(self):
        """Return a dictionary representation of this object for
        serialization in a JSON-RPC response."""
        error = dict(code=self.code,
                     message=self.message)
        if self.data:
            error['data'] = self.data

        return error
def as_dict ( self ) : error = dict ( code = self . code , message = self . message ) if self . data : error [ 'data' ] = self . data return error