Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make conversions of xrange() #10559

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

Closed
wants to merge 4 commits into from
Closed

Conversation

tropfcode
Copy link
Contributor

PR Summary

Remove imports of six.moves.xrange() and convert use of xrange() to range() or itertools.count() for Pythong3 compliance. This completes the first and third issues of #10556.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

…tring

Added RectangleSelector.geometry docstring
Remove import of xrange() and convert xrange() to range()
Import itertools and use itertools.count() to convert xrange() for Python3
@tropfcode
Copy link
Contributor Author

Will redo PR on different branch.

@tropfcode tropfcode closed this Feb 21, 2018
@@ -900,7 +900,7 @@ def get_split_ind(seq, N):

s_len = 0
# todo: use Alex's xrange pattern from the cbook for efficiency
for (word, ind) in zip(seq, xrange(len(seq))):
for (word, ind) in zip(seq, range(len(seq))):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use enumerate instead.

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

Successfully merging this pull request may close these issues.

2 participants