diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-07-27 12:45:24 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-07-27 12:45:40 -0700 |
commit | f2b38319ba986c566dc9aaaf74747facfe1a1b0c (patch) | |
tree | fdbd064d738efcf1052252b110a26cf00c109394 /warlock | |
parent | 2c24556370b82dac6f97d316ec75931a74987b86 (diff) | |
download | warlock-f2b38319ba986c566dc9aaaf74747facfe1a1b0c.tar.gz |
Add items method to model
This is similar to the iteritems method in implementation - it exposes
the 'items' method of the internal dictionary.
Bump version to v0.3.0
Diffstat (limited to 'warlock')
-rw-r--r-- | warlock/core.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/warlock/core.py b/warlock/core.py index 4b96345..4675b88 100644 --- a/warlock/core.py +++ b/warlock/core.py @@ -62,5 +62,8 @@ def model_factory(schema): def iteritems(self): return copy.deepcopy(self.__dict__['raw']).iteritems() + def items(self): + return copy.deepcopy(self.__dict__['raw']).items() + Model.__name__ = str(schema['name']) return Model |