def __getstate__(self):

        attrs = {}
        if hasattr(self, "__dict__"):
            attrs.update(self.__dict__)
        slots = []
        c = self.__class__
        while c is not None:
            if hasattr(c, "__slots__"):
                slots.extend(c.__slots__)
            c = c.__base__
        for name in slots:
            if hasattr(self, name):
                attrs[name] = getattr(self, name)
        return attrs
Obtain a dictionary representing this construct's state.
dataset/ETHPy150Open MostAwesomeDude/construct/construct/core.py/Construct.__getstate__