1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-22 09:42:28 +00:00
gists/repos/ddbd2be15e20eb81de1a/serializable.py
J. Fernando Sánchez a8afcd904a Add 'repos/ddbd2be15e20eb81de1a/' from commit '1a538670c5a6fc05f4eb6d3e67aa1f725b9b6b81'
git-subtree-dir: repos/ddbd2be15e20eb81de1a
git-subtree-mainline: 62d0e81a1a
git-subtree-split: 1a538670c5
2021-10-30 15:12:47 +02:00

9 lines
277 B
Python

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)