Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
93b64620
Commit
93b64620
authored
Feb 20, 2014
by
Aaron1011
Browse files
Merge pull request #252 from inactivist/add-model-repr
Basic Model __repr__ implementation (issue #251)
parents
a46f69cc
298b05ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/models.py
View file @
93b64620
...
...
@@ -58,6 +58,10 @@ class Model(object):
results
.
append
(
cls
.
parse
(
api
,
obj
))
return
results
def
__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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment