(self, obj)
store a local object in such a way that it could be recreated on
        the remote party either by-value or by-reference
store a local object in such a way that it could be recreated on
        the remote party either by-value or by-reference
store a local object in such a way that it could be recreated on the remote party either by - value or by - reference
def _box(self, obj):
        """store a local object in such a way that it could be recreated on
        the remote party either by-value or by-reference"""
        if brine.dumpable(obj):
            return consts.LABEL_VALUE, obj
        if type(obj) is tuple:
            return consts.LABEL_TUPLE, tuple(self._box(item) for item in obj)
        elif isinstance(obj, netref.BaseNetref) and obj.____conn__() is self:
            return consts.LABEL_LOCAL_REF, obj.____oid__
        else:
            self._local_objects.add(obj)
            try:
                cls = obj.__class__
            except Exception:
                # see issue #16
                cls = type(obj)
            if not isinstance(cls, type):
                cls = type(obj)
            return consts.LABEL_REMOTE_REF, (id(obj), cls.__name__, cls.__module__)
def _box ( self , obj ) : if brine . dumpable ( obj ) : return consts . LABEL_VALUE , obj if type ( obj ) is tuple : return consts . LABEL_TUPLE , tuple ( self . _box ( item ) for item in obj ) elif isinstance ( obj , netref . BaseNetref ) and obj . ____conn__ ( ) is self : return consts . LABEL_LOCAL_REF , obj . ____oid__ else : self . _local_objects . add ( obj ) try : cls = obj . __class__ except Exception : # see issue #16 cls = type ( obj ) if not isinstance ( cls , type ) : cls = type ( obj ) return consts . LABEL_REMOTE_REF , ( id ( obj ) , cls . __name__ , cls . __module__ )