def obtain(proxy): """obtains (copies) a remote object from a proxy object. the object is ``pickled`` on the remote side and ``unpickled`` locally, thus moved **by value**. changes made to the local object will not reflect remotely. :param proxy: an RPyC proxy object .. note:: the remote object to must be ``pickle``-able :returns: a copy of the remote object """ return pickle.loads(pickle.dumps(proxy))
def __array__(self): # Note that protocol=-1 will only work between python # interpreters of the same version. return pickle.loads(syncreq(self, consts.HANDLE_PICKLE, -1))