Created
June 18, 2014 20:41
-
-
Save adoc/f7eee413486c7cad07d5 to your computer and use it in GitHub Desktop.
Python 2.x `range` replacement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
range = xrange | |
log.warning("Replacing `range` with `xrange`.") | |
except NameError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment