diff options
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/odict.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/netlib/odict.py b/netlib/odict.py index 7c743f4e..46b74e8e 100644 --- a/netlib/odict.py +++ b/netlib/odict.py @@ -96,6 +96,16 @@ class ODict: def items(self): return self.lst[:] + def _get_state(self): + return [tuple(i) for i in self.lst] + + def _load_state(self, state): + self.list = [list(i) for i in state] + + @classmethod + def _from_state(klass, state): + return klass([list(i) for i in state]) + def copy(self): """ Returns a copy of this object. |