aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/core/result/normal.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-03-04 18:27:50 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-03-04 18:27:50 +0100
commitb9ad335335f9562d5cf033783b41fe40dd6efc03 (patch)
treeb7d381b753eef33db0d71a1777720806e80ade03 /pygithub3/core/result/normal.py
parentRefactor result. Now it's a package (diff)
downloadpython-github3-b9ad335335f9562d5cf033783b41fe40dd6efc03.tar.xz
python-github3-b9ad335335f9562d5cf033783b41fe40dd6efc03.zip
Get repository's commits supported with new result
Diffstat (limited to 'pygithub3/core/result/normal.py')
-rw-r--r--pygithub3/core/result/normal.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/pygithub3/core/result/normal.py b/pygithub3/core/result/normal.py
index c38a915..7f0e888 100644
--- a/pygithub3/core/result/normal.py
+++ b/pygithub3/core/result/normal.py
@@ -87,29 +87,29 @@ class Result(base.Result):
def __init__(self, method):
super(Result, self).__init__(method)
- self.counter = 0
- self.cached = False
+ self._counter = 0
+ self._cached = False
- def get_cached(func):
+ def _get_cached(func):
def wrapper(self):
- if self.cached:
- if str(self.counter) in self.getter.cache:
- page = Page(self.getter, self.counter)
- self.counter += 1
+ if self._cached:
+ if str(self._counter) in self.getter.cache:
+ page = Page(self.getter, self._counter)
+ self._counter += 1
return page
self._reset()
raise StopIteration
return func(self)
return wrapper
- @get_cached
+ @_get_cached
def __next__(self):
if self.getter.next:
- self.counter += 1
- return Page(self.getter, self.counter)
+ self._counter += 1
+ return Page(self.getter, self._counter)
self._reset()
raise StopIteration
def _reset(self):
- self.counter = 1
- self.cached = True
+ self._counter = 1
+ self._cached = True