(self)
return (constructor, parameters, self.__dict__)
Support for pickling.
Support for pickling.
Support for pickling .
def __reduce__(self):
        """Support for pickling."""
        constructor = self.__class__
        gattrs, vattrs, eattrs = {}, {}, {}
        for attr in self.attributes():
            gattrs[attr] = self[attr]
        for attr in self.vs.attribute_names():
            vattrs[attr] = self.vs[attr]
        for attr in self.es.attribute_names():
            eattrs[attr] = self.es[attr]
        parameters = (
            self.vcount(),
            self.get_edgelist(),
            self.is_directed(),
            gattrs,
            vattrs,
            eattrs,
        )
        return (constructor, parameters, self.__dict__)
def __reduce__ ( self ) : constructor = self . __class__ gattrs , vattrs , eattrs = { } , { } , { } for attr in self . attributes ( ) : gattrs [ attr ] = self [ attr ] for attr in self . vs . attribute_names ( ) : vattrs [ attr ] = self . vs [ attr ] for attr in self . es . attribute_names ( ) : eattrs [ attr ] = self . es [ attr ] parameters = ( self . vcount ( ) , self . get_edgelist ( ) , self . is_directed ( ) , gattrs , vattrs , eattrs , ) return ( constructor , parameters , self . __dict__ )