changed cursor() from recursion to while loop #284

Merged
drevicko merged 2 commits from non-recursive-cursor into master 2014-02-25 12:36:58 -08:00
drevicko commented 2013-11-07 18:08:47 -08:00 (Migrated from github.com)

this addresses issue #283

ps: happy for discussion on this...

this addresses issue #283 ps: happy for discussion on this...
michaelhelmick commented 2013-11-12 10:17:45 -08:00 (Migrated from github.com)

Calling while True: would force iteration though, and give no control over content actually being yielded by the generator, correct?

Calling `while True:` would force iteration though, and give no control over content actually being yielded by the generator, correct?
drevicko commented 2013-11-12 20:00:42 -08:00 (Migrated from github.com)

What do you mean by "force iteration through"? If it doesn't need to make a second api call, StopIteration is raised and it never loops...

Functionally it's identical to how it is using recursion. Instead of calling cursor() again, it loops until a StopIteration (or other exception) is generated.

What do you mean by "force iteration through"? If it doesn't need to make a second api call, `StopIteration` is raised and it never loops... Functionally it's identical to how it is using recursion. Instead of calling `cursor()` again, it loops until a `StopIteration` (or other exception) is generated.
michaelhelmick commented 2013-11-13 07:04:54 -08:00 (Migrated from github.com)

Hrm, I think I just was confused. I'll pull this branch hopefully this weekend to test and get it merged in if all is good! :) Thanks!

Hrm, I think I just was confused. I'll pull this branch hopefully this weekend to test and get it merged in if all is good! :) Thanks!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#284
No description provided.