projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7587192
)
Optimize the Model pickling a bit.
author
Joshua
<jroesslein@gmail.com>
Sat, 30 Jan 2010 15:58:51 +0000
(09:58 -0600)
committer
Joshua
<jroesslein@gmail.com>
Sat, 30 Jan 2010 15:58:51 +0000
(09:58 -0600)
tweepy/models.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/models.py
b/tweepy/models.py
index dd02944a2e896f4778ce026264651b784ac96016..2e2bff0df99205f7b667ce2d36bbbac33908cf7c 100644
(file)
--- a/
tweepy/models.py
+++ b/
tweepy/models.py
@@
-18,12
+18,8
@@
class Model(object):
def __getstate__(self):
# pickle
- pickle = {}
- for k, v in self.__dict__.items():
- if k == '_api':
- # do not pickle the api reference
- continue
- pickle[k] = v
+ pickle = dict(self.__dict__)
+ del pickle['_api'] # do not pickle the API reference
return pickle
@classmethod