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

Simple iterators: range(), enumerate() #178

Open
erkyrath opened this issue May 6, 2015 · 1 comment
Open

Simple iterators: range(), enumerate() #178

erkyrath opened this issue May 6, 2015 · 1 comment
Labels

Comments

@erkyrath
Copy link
Owner

erkyrath commented May 6, 2015

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.

@erkyrath erkyrath added the design label May 6, 2015
@erkyrath
Copy link
Owner Author

erkyrath commented May 8, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant