mirror of
https://github.com/balkian/gists.git
synced 2024-11-25 10:42:28 +00:00
Add 'repos/ddbd2be15e20eb81de1a/' from commit '1a538670c5a6fc05f4eb6d3e67aa1f725b9b6b81'
git-subtree-dir: repos/ddbd2be15e20eb81de1a git-subtree-mainline:62d0e81a1a
git-subtree-split:1a538670c5
This commit is contained in:
commit
a8afcd904a
9
repos/ddbd2be15e20eb81de1a/serializable.py
Normal file
9
repos/ddbd2be15e20eb81de1a/serializable.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
cls = self.__class__
|
||||||
|
property_names=[]
|
||||||
|
|
||||||
|
for p in dir(cls):
|
||||||
|
if isinstance(getattr(cls, p), property):
|
||||||
|
property_names.append(p)
|
||||||
|
logging.debug('property names: {}'.format(property_names))
|
||||||
|
for p in property_names:
|
||||||
|
ser['@%s' % p] = getattr(cls, p).fget(self)
|
Loading…
Reference in New Issue
Block a user