etc: Comment why we're binding xrange
Just mention there are differences between python versions
This commit is contained in:
@@ -13,6 +13,9 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import debugger_pretty_printers_common as rustpp
|
import debugger_pretty_printers_common as rustpp
|
||||||
|
|
||||||
|
# We want a version of `range` which doesn't allocate an intermediate list,
|
||||||
|
# specifically it should use a lazy iterator. In Python 2 this was `xrange`, but
|
||||||
|
# if we're running with Python 3 then we need to use `range` instead.
|
||||||
if sys.version_info.major >= 3:
|
if sys.version_info.major >= 3:
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user