aboutsummaryrefslogtreecommitdiffstats
path: root/github3/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'github3/models/base.py')
-rw-r--r--github3/models/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/github3/models/base.py b/github3/models/base.py
index df0c82b..bd07650 100644
--- a/github3/models/base.py
+++ b/github3/models/base.py
@@ -14,6 +14,9 @@ class BaseResource(object):
setattr(self, attr, value)
super(BaseResource, self).__init__()
+ def __len__(self):
+ return len(self.__dict__)
+
@classmethod
def idl(self):
raise NotImplementedError('Each model need subcass that method')