aboutsummaryrefslogtreecommitdiffstats
path: root/github3/models/base.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2011-11-15 23:26:31 +0100
committerDavid Medina <davidmedina9@gmail.com>2011-11-15 23:26:31 +0100
commit9e7d4e655d966b325cc9db190273f99220b6041b (patch)
treed571b474f0ead315667ff6fbff43fde594e0b071 /github3/models/base.py
parentComplete anonymous User handler test (diff)
downloadpython-github3-9e7d4e655d966b325cc9db190273f99220b6041b.tar.xz
python-github3-9e7d4e655d966b325cc9db190273f99220b6041b.zip
API change: Added gravatar_id in User model
Also fix some bugs, update test and PEP8
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')