about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-07-06 11:17:26 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-07-06 11:17:26 -0700
commit01c4b64b1ce4560918e59faeb481b5de25898baf (patch)
tree9957e8b96c5e6766cc56497d25c62ade5b34637e /src
parentab216a96aaa4597cd7b44c4f2fe891ac115f9d04 (diff)
downloadrust-01c4b64b1ce4560918e59faeb481b5de25898baf.tar.gz
rust-01c4b64b1ce4560918e59faeb481b5de25898baf.zip
etc: Comment why we're binding xrange
Just mention there are differences between python versions
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/gdb_rust_pretty_printing.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py
index ad0c9d085aa..554ab66bc56 100755
--- a/src/etc/gdb_rust_pretty_printing.py
+++ b/src/etc/gdb_rust_pretty_printing.py
@@ -13,6 +13,9 @@ import re
 import sys
 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:
     xrange = range