projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f450234
)
Basic Model __repr__ implementation (issue #251)
author
inactivist
<inactivist@gmail.com>
Thu, 14 Feb 2013 15:25:59 +0000
(07:25 -0800)
committer
inactivist
<inactivist@gmail.com>
Thu, 14 Feb 2013 15:25:59 +0000
(07:25 -0800)
tweepy/models.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/models.py
b/tweepy/models.py
index fe87adb0779d56d2cf20878d1b649f539912c2d7..0039e3d137f9bffb8eebd6ea2d9c347bee5515a0 100644
(file)
--- a/
tweepy/models.py
+++ b/
tweepy/models.py
@@
-39,6
+39,10
@@
class Model(object):
results.append(cls.parse(api, obj))
return results
+ def model__repr__(self):
+ state = ['%s=%s' % (k, repr(v)) for (k,v) in vars(self).items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(state))
+
class Status(Model):