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

xrange -> range #21

Closed
bd-j opened this issue May 14, 2017 · 3 comments
Closed

xrange -> range #21

bd-j opened this issue May 14, 2017 · 3 comments
Assignees
Labels
bug this shouldn't be happening

Comments

@bd-j
Copy link
Contributor

bd-j commented May 14, 2017

xrange only exists for python2. However, the concurrent.futures package with ThreadPoolExecutor or ProcessPoolExecutor only exists in python3

@joshspeagle
Copy link
Owner

What's a better way to iterate through things then? There are a couple of xrange(sys.maxiter) options floating around to keep things iterators, and generating a list or array seems very wasteful. Does range do that in python3?

@joshspeagle joshspeagle added the bug this shouldn't be happening label May 15, 2017
@joshspeagle joshspeagle self-assigned this May 15, 2017
@bd-j
Copy link
Contributor Author

bd-j commented May 15, 2017

yes, range in 3 acts like xrange in 2.

see here for compatible patterns
http://python-future.org/compatible_idioms.html

@joshspeagle
Copy link
Owner

Fantastic. I'll scour through and fix those tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this shouldn't be happening
Projects
None yet
Development

No branches or pull requests

2 participants