From bc4cad9df20a2b7022c8e2dd2d0af5fb374cc806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Fri, 19 Feb 2016 10:14:06 +0100 Subject: [PATCH] --- *scratch*.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 *scratch*.py diff --git a/*scratch*.py b/*scratch*.py new file mode 100644 index 0000000..86a09db --- /dev/null +++ b/*scratch*.py @@ -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) \ No newline at end of file