projects
/
diaspy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6768a4e
)
removed `__getitem__` and `__dict__` deprecations from models.py
author
CYBERDEViLNL
<CYBERDEViLNL@github.com>
Sat, 3 Nov 2018 20:53:19 +0000
(21:53 +0100)
committer
CYBERDEViLNL
<CYBERDEViLNL@github.com>
Sat, 3 Nov 2018 20:53:19 +0000
(21:53 +0100)
diaspy/models.py
patch
|
blob
|
blame
|
history
diff --git
a/diaspy/models.py
b/diaspy/models.py
index 43e7afe9564e779bec92473ed07919d327518b58..9535cb4e92c3353096626d890dd536d80a1f5788 100644
(file)
--- a/
diaspy/models.py
+++ b/
diaspy/models.py
@@
-513,18
+513,6
@@
class Post():
"""
return self._data['text']
"""
return self._data['text']
- def __getitem__(self, key):
- """FIXME This is deprecated, use diaspy.models.Post.data() instead to access
- data of Post objects.
- """
- return self._data[key]
-
- def __dict__(self):
- """Returns dictionary of posts data.
- FIXME This is deprecated, use diaspy.models.Post.data() instead.
- """
- return self._data
-
def _fetchdata(self):
"""This function retrieves data of the post.
def _fetchdata(self):
"""This function retrieves data of the post.
@@
-554,7
+542,6
@@
class Post():
def fetch(self, comments = False):
"""Fetches post data.
def fetch(self, comments = False):
"""Fetches post data.
- Use this function instead of diaspy.models.Post.update().
"""
self._fetchdata()
if comments:
"""
self._fetchdata()
if comments: