Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iteration with manually called next() #20

Merged
merged 2 commits into from
Sep 27, 2014

Conversation

igor-shevchenko
Copy link
Contributor

Currently, if one calls next() method on tweet iterable, it raises exception, because _nextTweet is defined in __iter__(). I fixed it and also moved the check of __response existence to next(), so it raises 'No results available' exception, if there's no response.

@ckoepp
Copy link
Owner

ckoepp commented Sep 25, 2014

Thanks a lot for the pull request.

I'll have a look at it and run the existing tests against it on the
weekend.
I'm pretty sure those will return green states and I can merge your
changes :)

On 2014-09-24 21:20, Igor Shevchenko wrote:

Currently, if one calls next() method on tweet iterable, it raises
exception, because _nextTweet is defined in __iter__(). I fixed
it
and also moved the check of __response existence to next(), so it
raises 'No results available' exception, if there's no
response.
You can merge this Pull Request by running:

git pull https://github.com/igor-shevchenko/TwitterSearch next

Or you can view, comment on it, or merge it online at:

#20

-- Commit Summary --

  • move _nextTweet initialization to constructor
  • Check existence of response in __next()

-- File Changes --

M TwitterSearch/TwitterSearch.py (6)

-- Patch Links --

https://github.com/ckoepp/TwitterSearch/pull/20.patch
https://github.com/ckoepp/TwitterSearch/pull/20.diff


Reply to this email directly or view it on GitHub:
#20

ckoepp added a commit that referenced this pull request Sep 27, 2014
Support iteration with manually called next()
@ckoepp ckoepp merged commit 38e94f6 into ckoepp:master Sep 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants