Permalink
Browse files

Fixed metadata on extended StackExchangeResultsets

  • Loading branch information...
lucjon committed May 24, 2010
1 parent 69cbc91 commit ba6f9d6c46a2d4f7c416e809d8691a252fe3db7d
Showing with 4 additions and 1 deletion.
  1. +4 −1 stackexchange.py
View
@@ -37,7 +37,10 @@ def fetch_page(self, page):
def fetch_extended(self, page):
next = self.fetch_page(page)
return self + next
extended = self + next
# max(0, ...) is so a non-zero, positive result for page is always found
return StackExchangeResultset(extended, max(1, self.page - 1), self.pagesize + next.pagesize, self.build_info)
def fetch_next(self):
return self.fetch_page(self.page + 1)

0 comments on commit ba6f9d6

Please sign in to comment.