while loop instead of recursive call in cursor() #283
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
cursor()function currently loops through pages returned by twitter by recursively calling itself.If, for example, I'm getting the follower list of a celebrity (say 5 million followers), it'll make 1000 api calls (twitter returns 5000 at a time), which will exceed pythons default recursion limit (990 on my setup).
It would be better to implement this as a while loop.
Pull request #284 addresses this - closing.