Mercurial > rinkhals
diff gamelib/serializer.py @ 505:3ed6c011106d
Switch to classmethod decorators.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 22:34:58 +0000 |
parents | fdda0f3c956b |
children | 03be16420e8b |
line wrap: on
line diff
--- a/gamelib/serializer.py Thu Nov 26 22:28:22 2009 +0000 +++ b/gamelib/serializer.py Thu Nov 26 22:34:58 2009 +0000 @@ -100,13 +100,14 @@ # List of attributes which need to be stored and restored SIMPLIFY = [] + @classmethod def make(cls): """ Create an object of this class without any attributes set. """ return cls.__new__(cls) - make = classmethod(make) + @classmethod def unsimplify(cls, value, refs=None): """ Create an object of this class (or a sub-class) from its @@ -130,7 +131,6 @@ setattr(obj, attr, unsimplify(value, refs)) return obj - unsimplify = classmethod(unsimplify) def simplify(self, refs=None): """