Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Use xrange from six to fix Python 3 support #1468

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Feb 25, 2019

T2T uses a mix of xrange and range leading to Python 3 errors when xrange isn't imported from six.moves.
This PR switches all usage of xrange to six.moves.range which is equivalent and supports both Python 3 and 2.

T2T uses a mix of `xrange` and `range` leading to Python 3 errors when `xrange` isn't imported from `six.moves`.
This PR switches all usage of `xrange` to `six.moves.range` which is equivalent and supports both Python 3 and 2.
@googlebot googlebot added the cla: yes PR author has signed CLA label Feb 25, 2019
@afrozenator
Copy link
Contributor

Thanks again @lgeiger !

tensorflow-copybara pushed a commit that referenced this pull request Mar 1, 2019
PiperOrigin-RevId: 236372428
@afrozenator afrozenator merged commit 7a9d665 into tensorflow:master Mar 1, 2019
@lgeiger lgeiger deleted the fix-py3-range branch March 1, 2019 23:06
kpe pushed a commit to kpe/tensor2tensor that referenced this pull request Mar 2, 2019
PiperOrigin-RevId: 236372428
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants