diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-08 04:33:10 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-08 04:33:10 +0100 |
commit | 655b521749efd5a600d342a1d95b67d32da280a8 (patch) | |
tree | 210635d4aa964873f8054c80fcbeb2e9f94ce6ab /netlib/utils.py | |
parent | 173ff0b235cdb45a8923f313807d9804830c2a2b (diff) | |
download | mitmproxy-655b521749efd5a600d342a1d95b67d32da280a8.tar.gz mitmproxy-655b521749efd5a600d342a1d95b67d32da280a8.tar.bz2 mitmproxy-655b521749efd5a600d342a1d95b67d32da280a8.zip |
fix docstrings
Diffstat (limited to 'netlib/utils.py')
-rw-r--r-- | netlib/utils.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index a0c2035c..d2fc7195 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -14,22 +14,29 @@ import hyperframe @six.add_metaclass(ABCMeta) class Serializable(object): """ - ABC for Python's pickle protocol __getstate__ and __setstate__. + Abstract Base Class that defines an API to save an object's state and restore it later on. """ @classmethod @abstractmethod def from_state(cls, state): - obj = cls.__new__(cls) - obj.__setstate__(state) - return obj + """ + Create a new object from the given state. + """ + raise NotImplementedError() @abstractmethod def get_state(self): + """ + Retrieve object state. + """ raise NotImplementedError() @abstractmethod def set_state(self, state): + """ + Set object state to the given state. + """ raise NotImplementedError() |