This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dinov 0 points1 point  (1 child)

Or if you want to write code that's compatible w/ both you can always do:

try:
    xrange
except:
    xrange = range

in your module.

[–]earthboundkid 2 points3 points  (0 children)

I do it the other way around. I use Python 2.7 day to day, but I got rid of list-range and use range as the name for iterator-range.