Proper way of getting next values in a generator - toot - Unnamed repository; edit this file 'description' to name the repository.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 3a1d7e17aaaa2d0f2e3c7b99692f9c5ceef63ed5
(DIR) parent 0c4a5f3aaf8833f8d70e83aa6ef772c6ce1300dd
(HTM) Author: Ivan Habunek <ivan@habunek.com>
Date: Wed, 26 Apr 2017 11:25:12 +0200
Proper way of getting next values in a generator
Diffstat:
toot/app.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/toot/app.py b/toot/app.py
@@ -109,7 +109,7 @@ class TimelineApp:
def fetch_next(self):
try:
- statuses = self.status_generator.__next__()
+ statuses = next(self.status_generator)
except StopIteration:
return None