tworld
tworld copied to clipboard
Simple iterators: range(), enumerate()
And maybe map(), filter(), zip()...?
The hazards of supporting iterators in the Twython environment will need much meditation. But they gotta be safer than the "naive" implementation of range() as returning a (perhaps gigantic) list object.
Python nitpickers remind me that a range object is not a generator; it's a sequence object with extra brainpower for the "in" operator (contains).
http://stackoverflow.com/questions/30081275/why-is-1000000000000000-in-range1000000000000001-so-fast